1
0
mirror of https://github.com/nlohmann/json synced 2024-11-15 16:50:06 +00:00

🐛 fixed logic error

This commit is contained in:
Niels Lohmann 2017-01-16 22:36:58 +01:00
parent 1ab26ab367
commit a00149f8ee
3 changed files with 12 additions and 12 deletions

View File

@ -78,13 +78,13 @@ matrix:
env:
- COMPILER=g++-4.9
- SPECIAL=no_exceptions
- TEST_PATTERN="-e \"*\""
- TEST_PATTERN=-e "*"
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: [g++-4.9, cppcheck]
before_script:
- make FLAGS="-fno-exceptions"
- CPPFLAGS="-DJSON_NOEXCEPTION" make
# Coveralls (http://gronlier.fr/blog/2015/01/adding-code-coverage-to-your-c-project/)

View File

@ -89,14 +89,14 @@ SOFTWARE.
#endif
// allow to disable exceptions
#if defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
#define JSON_THROW(exception) std::abort()
#define JSON_TRY if(true)
#define JSON_CATCH(exception) if(false)
#else
#if not defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
#define JSON_THROW(exception) throw exception
#define JSON_TRY try
#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
/*!

View File

@ -89,14 +89,14 @@ SOFTWARE.
#endif
// allow to disable exceptions
#if defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
#define JSON_THROW(exception) std::abort()
#define JSON_TRY if(true)
#define JSON_CATCH(exception) if(false)
#else
#if not defined(JSON_NOEXCEPTION) || defined(__EXCEPTIONS)
#define JSON_THROW(exception) throw exception
#define JSON_TRY try
#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
/*!