diff --git a/include/nlohmann/detail/conversions/from_json.hpp b/include/nlohmann/detail/conversions/from_json.hpp index 522292247..ecc347d9f 100644 --- a/include/nlohmann/detail/conversions/from_json.hpp +++ b/include/nlohmann/detail/conversions/from_json.hpp @@ -378,12 +378,8 @@ inline void from_json(const BasicJsonType& j, ArithmeticType& val) val = static_cast(*j.template get_ptr()); break; } - case value_t::boolean: - { - val = static_cast(*j.template get_ptr()); - break; - } + case value_t::boolean: case value_t::null: case value_t::object: case value_t::array: diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 02441416b..36b26baf8 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -5051,12 +5051,8 @@ inline void from_json(const BasicJsonType& j, ArithmeticType& val) val = static_cast(*j.template get_ptr()); break; } - case value_t::boolean: - { - val = static_cast(*j.template get_ptr()); - break; - } + case value_t::boolean: case value_t::null: case value_t::object: case value_t::array: