From 83683da13f6e284ca0f3d4e8a257a0d0150aff9c Mon Sep 17 00:00:00 2001 From: xiaoyur347 Date: Wed, 19 Nov 2014 16:13:11 +0800 Subject: [PATCH] fix gcc warning when CXXFLAGS contains '-Wextra' json_value.cpp:179:26: warning: enumeral and non-enumeral type in conditional expression [enabled by default] https://github.com/open-source-parsers/jsoncpp/pull/84 --- src/lib_json/json_value.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib_json/json_value.cpp b/src/lib_json/json_value.cpp index b6ea8ff63..b73deac17 100644 --- a/src/lib_json/json_value.cpp +++ b/src/lib_json/json_value.cpp @@ -175,7 +175,8 @@ Value::CZString::CZString(const CZString& other) ? duplicateStringValue(other.cstr_) : other.cstr_), index_(other.cstr_ - ? (other.index_ == noDuplication ? noDuplication : duplicate) + ? static_cast(other.index_ == noDuplication + ? noDuplication : duplicate) : other.index_) {} Value::CZString::~CZString() {