mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-10-15 15:16:47 +02:00
Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4eeafbcc6b | ||
![]() |
250bd9a00f | ||
![]() |
abd1bb0709 | ||
![]() |
15949af098 | ||
![]() |
8dc52b3cca | ||
![]() |
add941c1a9 |
@@ -171,7 +171,7 @@ private:
|
|||||||
CZString(const char* cstr, DuplicationPolicy allocate);
|
CZString(const char* cstr, DuplicationPolicy allocate);
|
||||||
CZString(const CZString& other);
|
CZString(const CZString& other);
|
||||||
~CZString();
|
~CZString();
|
||||||
CZString& operator=(CZString other);
|
CZString &operator=(const CZString &other);
|
||||||
bool operator<(const CZString& other) const;
|
bool operator<(const CZString& other) const;
|
||||||
bool operator==(const CZString& other) const;
|
bool operator==(const CZString& other) const;
|
||||||
ArrayIndex index() const;
|
ArrayIndex index() const;
|
||||||
@@ -238,7 +238,7 @@ Json::Value obj_value(Json::objectValue); // {}
|
|||||||
Value(const Value& other);
|
Value(const Value& other);
|
||||||
~Value();
|
~Value();
|
||||||
|
|
||||||
Value& operator=(Value other);
|
Value &operator=(const Value &other);
|
||||||
/// Swap values.
|
/// Swap values.
|
||||||
/// \note Currently, comments are intentionally not swapped, for
|
/// \note Currently, comments are intentionally not swapped, for
|
||||||
/// both logic and efficiency.
|
/// both logic and efficiency.
|
||||||
|
@@ -6,9 +6,15 @@ ELSE(JSONCPP_LIB_BUILD_SHARED)
|
|||||||
SET(JSONCPP_LIB_TYPE STATIC)
|
SET(JSONCPP_LIB_TYPE STATIC)
|
||||||
ENDIF(JSONCPP_LIB_BUILD_SHARED)
|
ENDIF(JSONCPP_LIB_BUILD_SHARED)
|
||||||
|
|
||||||
|
|
||||||
if( CMAKE_COMPILER_IS_GNUCXX )
|
if( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
#Get compiler version.
|
||||||
|
execute_process( COMMAND ${CMAKE_CXX_COMPILER} -dumpversion
|
||||||
|
OUTPUT_VARIABLE GNUCXX_VERSION )
|
||||||
|
|
||||||
|
#-Werror=* was introduced -after- GCC 4.1.2
|
||||||
|
if( GNUCXX_VERSION VERSION_GREATER 4.1.2 )
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=strict-aliasing")
|
||||||
|
endif()
|
||||||
endif( CMAKE_COMPILER_IS_GNUCXX )
|
endif( CMAKE_COMPILER_IS_GNUCXX )
|
||||||
|
|
||||||
SET( JSONCPP_INCLUDE_DIR ../../include )
|
SET( JSONCPP_INCLUDE_DIR ../../include )
|
||||||
|
@@ -188,8 +188,9 @@ void Value::CZString::swap(CZString& other) {
|
|||||||
std::swap(index_, other.index_);
|
std::swap(index_, other.index_);
|
||||||
}
|
}
|
||||||
|
|
||||||
Value::CZString& Value::CZString::operator=(CZString other) {
|
Value::CZString &Value::CZString::operator=(const CZString &other) {
|
||||||
swap(other);
|
CZString temp(other);
|
||||||
|
swap(temp);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -478,8 +479,9 @@ Value::~Value() {
|
|||||||
delete[] comments_;
|
delete[] comments_;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value& Value::operator=(Value other) {
|
Value &Value::operator=(const Value &other) {
|
||||||
swap(other);
|
Value temp(other);
|
||||||
|
swap(temp);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -26,6 +26,11 @@
|
|||||||
#pragma warning(disable : 4996)
|
#pragma warning(disable : 4996)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__sun) && defined(__SVR4) //Solaris
|
||||||
|
#include <ieeefp.h>
|
||||||
|
#define isfinite finite
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Json {
|
namespace Json {
|
||||||
|
|
||||||
static bool containsControlCharacter(const char* str) {
|
static bool containsControlCharacter(const char* str) {
|
||||||
|
Reference in New Issue
Block a user