mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-14 02:35:09 +01:00
single-arg string ctor
This commit is contained in:
parent
9ebfc8d37b
commit
fdcc2e4428
@ -137,7 +137,7 @@ JSONCPP_STRING valueToString(double value, bool useSpecialFloats, unsigned int p
|
|||||||
return reps[useSpecialFloats ? 0 : 1][isnan(value) ? 0 : (value < 0) ? 1 : 2];
|
return reps[useSpecialFloats ? 0 : 1][isnan(value) ? 0 : (value < 0) ? 1 : 2];
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONCPP_STRING buffer(36, '\0');
|
JSONCPP_STRING buffer(36);
|
||||||
while (true) {
|
while (true) {
|
||||||
int len = snprintf(&*buffer.begin(), buffer.size(),
|
int len = snprintf(&*buffer.begin(), buffer.size(),
|
||||||
(precisionType == PrecisionType::significantDigits) ? "%.*g" : "%.*f",
|
(precisionType == PrecisionType::significantDigits) ? "%.*g" : "%.*f",
|
||||||
|
Loading…
Reference in New Issue
Block a user