diff --git a/src/json.hpp b/src/json.hpp index 5fdd83d6e..d7af3a707 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -3036,10 +3036,8 @@ class basic_json { return m_value.boolean; } - else - { - JSON_THROW(std::domain_error("type must be boolean, but is " + type_name())); - } + + JSON_THROW(std::domain_error("type must be boolean, but is " + type_name())); } /// get a pointer to the value (object) diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index 068b87630..cc11457f4 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -3036,10 +3036,8 @@ class basic_json { return m_value.boolean; } - else - { - JSON_THROW(std::domain_error("type must be boolean, but is " + type_name())); - } + + JSON_THROW(std::domain_error("type must be boolean, but is " + type_name())); } /// get a pointer to the value (object)