diff --git a/include/nlohmann/detail/input/lexer.hpp b/include/nlohmann/detail/input/lexer.hpp index 9809b4e89..f516dd7a2 100644 --- a/include/nlohmann/detail/input/lexer.hpp +++ b/include/nlohmann/detail/input/lexer.hpp @@ -1250,7 +1250,7 @@ scan_number_done: if (errno == 0) { value_unsigned = static_cast(x); - if (static_cast(value_unsigned) == x) + if (static_cast(value_unsigned) == x) { return token_type::value_unsigned; } @@ -1266,7 +1266,7 @@ scan_number_done: if (errno == 0) { value_integer = static_cast(x); - if (static_cast(value_integer) == x) + if (static_cast(value_integer) == x) { return token_type::value_integer; } diff --git a/tests/src/unit-custom-integer.cpp b/tests/src/unit-custom-integer.cpp index bcf6fa398..9de1fda02 100644 --- a/tests/src/unit-custom-integer.cpp +++ b/tests/src/unit-custom-integer.cpp @@ -86,11 +86,11 @@ template class std::numeric_limits> TEST_CASE("custom integer types") { - using json = nlohmann::basic_json < - std::map, std::vector, std::string, bool, - wrapped_int, wrapped_int, double, std::allocator >; + using my_json = nlohmann::basic_json < + std::map, std::vector, std::string, bool, + wrapped_int, wrapped_int, double, std::allocator >; std::string data = "[1,2,-3,-4]"; - json as_json = json::parse(data.begin(), data.end()); + my_json as_json = my_json::parse(data.begin(), data.end()); wrapped_int i1 = as_json[1]; wrapped_int i2 = as_json[2]; CHECK(i1 == wrapped_int(2));