We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 981d05b + 54686de commit 76808e4Copy full SHA for 76808e4
src/json/json.cpp
@@ -160,20 +160,13 @@ bool Json::Value::getBoolean() const {
160
switch(_type){
161
case booleanType:
162
assert(!_data.empty());
163
- if(_data[0] == 't')
164
- return true;
165
- else
166
- return false;
+ return (_data[0] == 't');
167
168
case numberType:
169
- if(getInt() != 0)
170
+ return (getInt() != 0);
171
172
case stringType:
173
- if(_data == "true")
174
175
- if(_data == "false")
176
+ return (_data == "true");
177
178
case nullType:
179
return false;
0 commit comments