Apply the formatting specified in .clang-format file.

$ clang-format --version
  clang-format version 7.0.0 (tags/google/stable/2018-01-11)
  $ clang-format -i --style=file $(find . -name '*.cpp' -o -name '*.h')
This commit is contained in:
Billy Donahue
2018-05-20 16:55:27 -04:00
parent abd39e791b
commit b5e1fe89aa
16 changed files with 1176 additions and 1285 deletions

View File

@@ -6,8 +6,8 @@
#ifndef CPPTL_JSON_ASSERTIONS_H_INCLUDED
#define CPPTL_JSON_ASSERTIONS_H_INCLUDED
#include <stdlib.h>
#include <sstream>
#include <stdlib.h>
#if !defined(JSON_IS_AMALGAMATION)
#include "config.h"
@@ -20,30 +20,35 @@
#if JSON_USE_EXCEPTION
// @todo <= add detail about condition in exception
# define JSON_ASSERT(condition) \
{if (!(condition)) {Json::throwLogicError( "assert json failed" );}}
# define JSON_FAIL_MESSAGE(message) \
#define JSON_ASSERT(condition) \
{ \
JSONCPP_OSTRINGSTREAM oss; oss << message; \
if (!(condition)) { \
Json::throwLogicError("assert json failed"); \
} \
}
#define JSON_FAIL_MESSAGE(message) \
{ \
JSONCPP_OSTRINGSTREAM oss; \
oss << message; \
Json::throwLogicError(oss.str()); \
abort(); \
}
#else // JSON_USE_EXCEPTION
# define JSON_ASSERT(condition) assert(condition)
#define JSON_ASSERT(condition) assert(condition)
// The call to assert() will show the failure message in debug builds. In
// release builds we abort, for a core-dump or debugger.
# define JSON_FAIL_MESSAGE(message) \
#define JSON_FAIL_MESSAGE(message) \
{ \
JSONCPP_OSTRINGSTREAM oss; oss << message; \
JSONCPP_OSTRINGSTREAM oss; \
oss << message; \
assert(false && oss.str().c_str()); \
abort(); \
}
#endif
#define JSON_ASSERT_MESSAGE(condition, message) \