simplified code
This commit is contained in:
parent
442cc9b6de
commit
278a9e7052
1 changed files with 2 additions and 6 deletions
|
@ -322,9 +322,7 @@ const std::string JSON::toString() const {
|
||||||
#ifdef __cplusplus11
|
#ifdef __cplusplus11
|
||||||
return std::to_string(_value.number);
|
return std::to_string(_value.number);
|
||||||
#else
|
#else
|
||||||
std::stringstream s;
|
return int_to_string(_value.number);
|
||||||
s << _value.number;
|
|
||||||
return s.str();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,9 +330,7 @@ const std::string JSON::toString() const {
|
||||||
#ifdef __cplusplus11
|
#ifdef __cplusplus11
|
||||||
return std::to_string(_value.number_float);
|
return std::to_string(_value.number_float);
|
||||||
#else
|
#else
|
||||||
std::stringstream s;
|
return int_to_string(_value.number_float);
|
||||||
s << _value.number_float;
|
|
||||||
return s.str();
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue