mirror of
https://github.com/nlohmann/json.git
synced 2026-10-12 01:17:14 +00:00
🐛 fixed logic error
This commit is contained in:
1 parent
1ab26ab367
commit
a00149f8ee
3 files changed
+12
-12
No files matched your search
+2
-2
@@ -78,13 +78,13 @@ matrix:
|
|||||||
env:
|
env:
|
||||||
- COMPILER=g++-4.9
|
- COMPILER=g++-4.9
|
||||||
- SPECIAL=no_exceptions
|
- SPECIAL=no_exceptions
|
||||||
- TEST_PATTERN="-e \"*\""
|
- TEST_PATTERN=-e "*"
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ['ubuntu-toolchain-r-test']
|
sources: ['ubuntu-toolchain-r-test']
|
||||||
packages: [g++-4.9, cppcheck]
|
packages: [g++-4.9, cppcheck]
|
||||||
before_script:
|
before_script:
|
||||||
- make FLAGS="-fno-exceptions"
|
- CPPFLAGS="-DJSON_NOEXCEPTION" make
|
||||||
|
|
||||||
# Coveralls (http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
|
# Coveralls (http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -89,14 +89,14 @@ SOFTWARE.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// allow to disable exceptions
|
// allow to disable exceptions
|
||||||
#if defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
|
#if not defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
|
||||||
#define JSON_THROW(exception) std::abort()
|
|
||||||
#define JSON_TRY if(true)
|
|
||||||
#define JSON_CATCH(exception) if(false)
|
|
||||||
#else
|
|
||||||
#define JSON_THROW(exception) throw exception
|
#define JSON_THROW(exception) throw exception
|
||||||
#define JSON_TRY try
|
#define JSON_TRY try
|
||||||
#define JSON_CATCH(exception) catch(exception)
|
#define JSON_CATCH(exception) catch(exception)
|
||||||
|
#else
|
||||||
|
#define JSON_THROW(exception) std::abort()
|
||||||
|
#define JSON_TRY if(true)
|
||||||
|
#define JSON_CATCH(exception) if(false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
+5
-5
@@ -89,14 +89,14 @@ SOFTWARE.
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// allow to disable exceptions
|
// allow to disable exceptions
|
||||||
#if defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
|
#if not defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
|
||||||
#define JSON_THROW(exception) std::abort()
|
|
||||||
#define JSON_TRY if(true)
|
|
||||||
#define JSON_CATCH(exception) if(false)
|
|
||||||
#else
|
|
||||||
#define JSON_THROW(exception) throw exception
|
#define JSON_THROW(exception) throw exception
|
||||||
#define JSON_TRY try
|
#define JSON_TRY try
|
||||||
#define JSON_CATCH(exception) catch(exception)
|
#define JSON_CATCH(exception) catch(exception)
|
||||||
|
#else
|
||||||
|
#define JSON_THROW(exception) std::abort()
|
||||||
|
#define JSON_TRY if(true)
|
||||||
|
#define JSON_CATCH(exception) if(false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
Reference in new issue
Block a user