This commit is contained in:
Christopher Dunn 2014-09-03 13:46:37 -07:00
parent 8eb6f88a87
commit d94caac1ea
2 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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
{