mirror of
https://github.com/nlohmann/json.git
synced 2024-11-23 22:19:02 +08:00
simplified code
This commit is contained in:
parent
442cc9b6de
commit
278a9e7052
@ -322,9 +322,7 @@ const std::string JSON::toString() const {
|
||||
#ifdef __cplusplus11
|
||||
return std::to_string(_value.number);
|
||||
#else
|
||||
std::stringstream s;
|
||||
s << _value.number;
|
||||
return s.str();
|
||||
return int_to_string(_value.number);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -332,9 +330,7 @@ const std::string JSON::toString() const {
|
||||
#ifdef __cplusplus11
|
||||
return std::to_string(_value.number_float);
|
||||
#else
|
||||
std::stringstream s;
|
||||
s << _value.number_float;
|
||||
return s.str();
|
||||
return int_to_string(_value.number_float);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user