From b210f2dbf41fc207a91e57359c8b2cffdba64ebf Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Sun, 29 Jan 2017 21:40:37 +0100 Subject: [PATCH] :lipstick: minor refactoring --- src/json.hpp | 6 ++---- src/json.hpp.re2c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) 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)