Skip to content

Commit 83683da

Browse files
xiaoyur347cdunn2001
authored andcommitted
fix gcc warning when CXXFLAGS contains '-Wextra'
json_value.cpp:179:26: warning: enumeral and non-enumeral type in conditional expression [enabled by default] open-source-parsers#84
1 parent e5de78d commit 83683da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/lib_json/json_value.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,8 @@ Value::CZString::CZString(const CZString& other)
175175
? duplicateStringValue(other.cstr_)
176176
: other.cstr_),
177177
index_(other.cstr_
178-
? (other.index_ == noDuplication ? noDuplication : duplicate)
178+
? static_cast<ArrayIndex>(other.index_ == noDuplication
179+
? noDuplication : duplicate)
179180
: other.index_) {}
180181

181182
Value::CZString::~CZString() {

0 commit comments

Comments
 (0)