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
This commit is contained in:
xiaoyur347 2014-11-19 16:13:11 +08:00 committed by Christopher Dunn
parent e5de78db82
commit 83683da13f

View File

@ -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<ArrayIndex>(other.index_ == noDuplication
? noDuplication : duplicate)
: other.index_) {}
Value::CZString::~CZString() {