@@ -28,11 +28,7 @@ struct Options {
2828
2929static JSONCPP_STRING normalizeFloatingPointStr (double value) {
3030 char buffer[32 ];
31- #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
32- sprintf_s (buffer, sizeof (buffer), " %.16g" , value);
33- #else
34- snprintf (buffer, sizeof (buffer), " %.16g" , value);
35- #endif
31+ jsoncpp_snprintf (buffer, sizeof (buffer), " %.16g" , value);
3632 buffer[sizeof (buffer) - 1 ] = 0 ;
3733 JSONCPP_STRING s (buffer);
3834 JSONCPP_STRING::size_type index = s.find_last_of (" eE" );
@@ -105,11 +101,7 @@ static void printValueTree(FILE* fout,
105101 Json::ArrayIndex size = value.size ();
106102 for (Json::ArrayIndex index = 0 ; index < size; ++index) {
107103 static char buffer[16 ];
108- #if defined(_MSC_VER) && defined(__STDC_SECURE_LIB__)
109- sprintf_s (buffer, sizeof (buffer), " [%u]" , index);
110- #else
111- snprintf (buffer, sizeof (buffer), " [%u]" , index);
112- #endif
104+ jsoncpp_snprintf (buffer, sizeof (buffer), " [%u]" , index);
113105 printValueTree (fout, value[index], path + buffer);
114106 }
115107 } break ;
0 commit comments