From 6812c973c9fa9b4ad642ab81856c05f87bd6fcc4 Mon Sep 17 00:00:00 2001 From: KyleMiles Date: Thu, 27 Jan 2022 22:43:28 -0500 Subject: Format All Files --- rapidjsonwrapper.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'rapidjsonwrapper.h') diff --git a/rapidjsonwrapper.h b/rapidjsonwrapper.h index d1988b42..5b117413 100644 --- a/rapidjsonwrapper.h +++ b/rapidjsonwrapper.h @@ -4,33 +4,36 @@ #if defined(__GNUC__) && __GNUC__ >= 8 // Disable warnings from rapidjson performance optimizations -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wclass-memaccess" + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wclass-memaccess" #endif struct GenericException; struct ParseException; -struct GenericException: public std::exception +struct GenericException : public std::exception { GenericException() : std::exception() {} - virtual const char* what() const throw() - { - return "Exception while parsing json."; - } + virtual const char* what() const throw() { return "Exception while parsing json."; } }; -#define RAPIDJSON_HAS_STDSTRING 0 +#define RAPIDJSON_HAS_STDSTRING 0 #define RAPIDJSON_HAS_CXX11_NOEXCEPT 0 -#define RAPIDJSON_ASSERT(x) do {if (!(x)) throw GenericException(); } while(0); -#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode,offset) \ +#define RAPIDJSON_ASSERT(x) \ + do \ + { \ + if (!(x)) \ + throw GenericException(); \ + } while (0); +#define RAPIDJSON_PARSE_ERROR_NORETURN(parseErrorCode, offset) \ throw ParseException(parseErrorCode, #parseErrorCode, offset) #include "rapidjson/error/error.h" -struct ParseException: public std::runtime_error, public rapidjson::ParseResult +struct ParseException : public std::runtime_error, public rapidjson::ParseResult { - ParseException(rapidjson::ParseErrorCode code, const char* msg, size_t offset) : std::runtime_error(msg), - ParseResult(code, offset) {} + ParseException(rapidjson::ParseErrorCode code, const char* msg, size_t offset) : + std::runtime_error(msg), ParseResult(code, offset) + {} }; #include "rapidjson/error/en.h" @@ -41,5 +44,5 @@ struct ParseException: public std::runtime_error, public rapidjson::ParseResult #include "rapidjson/prettywriter.h" #if defined(__GNUC__) && __GNUC__ >= 8 -#pragma GCC diagnostic pop + #pragma GCC diagnostic pop #endif -- cgit v1.3.1