diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index f8f7d71..0f5d594 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -206,14 +206,17 @@ Exception::Exception(String msg) : msg_(std::move(msg)) {} Exception::~Exception() JSONCPP_NOEXCEPT {} char const* Exception::what() const JSONCPP_NOEXCEPT { return msg_.c_str(); } RuntimeError::RuntimeError(String const& msg) : Exception(msg) {} -LogicError::LogicError(String const& msg) : Exception(msg) {} -[[noreturn]] void throwRuntimeError(String const& msg) { +LogicError::LogicError(String const& msg) + : Exception(msg){}[[noreturn]] void throwRuntimeError(String const& msg) { throw RuntimeError(msg); } [[noreturn]] void throwLogicError(String const& msg) { throw LogicError(msg); } #else // !JSON_USE_EXCEPTION -[[noreturn]] void throwRuntimeError(String const& msg) { abort(); } -[[noreturn]] void throwLogicError(String const& msg) { abort(); } +[[noreturn]] void throwRuntimeError(String const& msg) { + abort(); +}[[noreturn]] void throwLogicError(String const& msg) { + abort(); +} #endif // ////////////////////////////////////////////////////////////////// @@ -227,7 +230,9 @@ LogicError::LogicError(String const& msg) : Exception(msg) {} // Notes: policy_ indicates if the string was allocated when // a string is stored. -Value::CZString::CZString(ArrayIndex index) : cstr_(nullptr), index_(index) {} +Value::CZString::CZString(ArrayIndex index) + : cstr_(nullptr), index_(index) { +} Value::CZString::CZString(char const* str, unsigned length, DuplicationPolicy allocate)