From 676405939561adf064e29dd72a0616ea43b5b584 Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Tue, 13 May 2014 09:49:25 +0000 Subject: [PATCH] fix stdexcept https://sourceforge.net/p/jsoncpp/bugs/68/ --- include/json/assertions.h | 1 + include/json/version.h | 28 ++++++++++++++-------------- src/lib_json/json_reader.cpp | 1 - src/lib_json/json_value.cpp | 1 - src/test_lib_json/main.cpp | 3 ++- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/json/assertions.h b/include/json/assertions.h index a480585..9c17461 100644 --- a/include/json/assertions.h +++ b/include/json/assertions.h @@ -13,6 +13,7 @@ #endif // if !defined(JSON_IS_AMALGAMATION) #if JSON_USE_EXCEPTION +# include #define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw #define JSON_FAIL_MESSAGE( message ) throw std::runtime_error( message ); #else // JSON_USE_EXCEPTION diff --git a/include/json/version.h b/include/json/version.h index 9e1efcc..d3466c0 100644 --- a/include/json/version.h +++ b/include/json/version.h @@ -1,14 +1,14 @@ -// DO NOT EDIT. This file is generated by CMake from "version" -// and "version.h.in" files. -// Run CMake configure step to update it. -#ifndef JSON_VERSION_H_INCLUDED -# define JSON_VERSION_H_INCLUDED - -# define JSONCPP_VERSION_STRING "0.6.0-dev" -# define JSONCPP_VERSION_MAJOR 0 -# define JSONCPP_VERSION_MINOR 6 -# define JSONCPP_VERSION_PATCH 0 -# define JSONCPP_VERSION_QUALIFIER -dev -# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) - -#endif // JSON_VERSION_H_INCLUDED +// DO NOT EDIT. This file is generated by CMake from "version" +// and "version.h.in" files. +// Run CMake configure step to update it. +#ifndef JSON_VERSION_H_INCLUDED +# define JSON_VERSION_H_INCLUDED + +# define JSONCPP_VERSION_STRING "0.6.0-dev" +# define JSONCPP_VERSION_MAJOR 0 +# define JSONCPP_VERSION_MINOR 6 +# define JSONCPP_VERSION_PATCH 0 +# define JSONCPP_VERSION_QUALIFIER -dev +# define JSONCPP_VERSION_HEXA ((JSONCPP_VERSION_MAJOR << 24) | (JSONCPP_VERSION_MINOR << 16) | (JSONCPP_VERSION_PATCH << 8)) + +#endif // JSON_VERSION_H_INCLUDED diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 4f592cd..8fd2f4c 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #if defined(_MSC_VER) && _MSC_VER >= 1400 // VC++ 8.0 #pragma warning( disable : 4996 ) // disable warning about strdup being deprecated. diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index abc59c8..55a47c9 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #ifdef JSON_USE_CPPTL diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp index 8c5a20b..8eb4996 100644 --- a/src/test_lib_json/main.cpp +++ b/src/test_lib_json/main.cpp @@ -3,9 +3,10 @@ // recognized in your jurisdiction. // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE +#include "jsontest.h" #include #include -#include "jsontest.h" +#include // Make numeric limits more convenient to talk about. // Assumes int type in 32 bits.