mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-04-06 02:45:02 +02:00
ws
This commit is contained in:
parent
8eb6f88a87
commit
d94caac1ea
@ -105,7 +105,7 @@ static inline char *duplicateStringValue(const char *value,
|
||||
/** Free the string duplicated by duplicateStringValue().
|
||||
*/
|
||||
static inline void releaseStringValue(char *value) {
|
||||
free(value);
|
||||
free(value);
|
||||
}
|
||||
|
||||
} // namespace Json
|
||||
|
@ -74,20 +74,20 @@ std::string valueToString(double value) {
|
||||
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with
|
||||
// visual studio 2005 to
|
||||
// avoid warning.
|
||||
int len;
|
||||
int len;
|
||||
#if defined(WINCE)
|
||||
len = _snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||
len = _snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||
#else
|
||||
len = sprintf_s(buffer, sizeof(buffer), "%.16g", value);
|
||||
len = sprintf_s(buffer, sizeof(buffer), "%.16g", value);
|
||||
#endif
|
||||
assert(len>=0);
|
||||
fixNumericLocale(buffer, buffer + len);
|
||||
assert(len>=0);
|
||||
fixNumericLocale(buffer, buffer + len);
|
||||
#else
|
||||
if ( isfinite( value ))
|
||||
{
|
||||
int len = snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||
assert(len>=0);
|
||||
fixNumericLocale(buffer, buffer + len);
|
||||
{
|
||||
int len = snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||
assert(len>=0);
|
||||
fixNumericLocale(buffer, buffer + len);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user