mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2025-05-18 19:37:35 +02:00
WinCE Compatibility Fix
Note: str.imbue and std::locale::classic() are not supported on WINCE
This commit is contained in:
parent
8582876c5c
commit
27e3263894
@ -781,7 +781,11 @@ std::string Reader::getLocationLineAndColumn(Location location) const {
|
||||
getLocationLineAndColumn(location, line, column);
|
||||
char buffer[18 + 16 + 16 + 1];
|
||||
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
|
||||
#if defined(WINCE)
|
||||
_snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
||||
#else
|
||||
sprintf_s(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
||||
#endif
|
||||
#else
|
||||
snprintf(buffer, sizeof(buffer), "Line %d, Column %d", line, column);
|
||||
#endif
|
||||
|
@ -73,7 +73,11 @@ std::string valueToString(double value) {
|
||||
#if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__) // Use secure version with
|
||||
// visual studio 2005 to
|
||||
// avoid warning.
|
||||
#if defined(WINCE)
|
||||
_snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||
#else
|
||||
sprintf_s(buffer, sizeof(buffer), "%.16g", value);
|
||||
#endif
|
||||
#else
|
||||
snprintf(buffer, sizeof(buffer), "%.16g", value);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user