Skip to content

Commit 76808e4

Browse files
authored
Merge pull request QHedgeTech#15 from frodegill/master
Compile-fix for g++ 7.2 (-Werror=implicit-fallthrough=)
2 parents 981d05b + 54686de commit 76808e4

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

src/json/json.cpp

+3-10
Original file line numberDiff line numberDiff line change
@@ -160,20 +160,13 @@ bool Json::Value::getBoolean() const {
160160
switch(_type){
161161
case booleanType:
162162
assert(!_data.empty());
163-
if(_data[0] == 't')
164-
return true;
165-
else
166-
return false;
163+
return (_data[0] == 't');
167164

168165
case numberType:
169-
if(getInt() != 0)
170-
return true;
166+
return (getInt() != 0);
171167

172168
case stringType:
173-
if(_data == "true")
174-
return true;
175-
if(_data == "false")
176-
return false;
169+
return (_data == "true");
177170

178171
case nullType:
179172
return false;

0 commit comments

Comments
 (0)