Explorar el Código

HPCC-12035 Update based on review

Signed-off-by: Anthony Fishbeck <anthony.fishbeck@lexisnexis.com>
Anthony Fishbeck hace 11 años
padre
commit
6df6dfd581
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 1 1
      system/jlib/jstring.cpp
  2. 3 3
      system/jlib/jutil.cpp

+ 1 - 1
system/jlib/jstring.cpp

@@ -1966,7 +1966,7 @@ jlib_decl StringBuffer &appendJSONDataValue(StringBuffer& s, const char *name, u
 StringBuffer &appendJSONRealValue(StringBuffer& s, const char *name, double value)
 {
     appendJSONNameOrDelimit(s, name);
-    bool quoted = isnan(value) || isinf(value);
+    bool quoted = j_isnan(value) || j_isinf(value);
     if (quoted)
         s.append('"');
     s.append(value);

+ 3 - 3
system/jlib/jutil.cpp

@@ -113,7 +113,7 @@ bool safe_fcvt(size_t len, char * buffer, double value, int numPlaces, int * dec
 
 bool j_isnan(double x)
 {
-#ifdef _WIN32
+#ifdef _MSC_VER
     return _isnan(x)!=0;
 #else
     return std::isnan(x);
@@ -122,9 +122,9 @@ bool j_isnan(double x)
 
 bool j_isinf(double x)
 {
-#ifdef _WIN32
+#ifdef _MSC_VER
     int fpv = _fpclass(x);
-    return (fpv==_FPCLASS_PINF || fpv==_FPCLASS_NINF)
+    return (fpv==_FPCLASS_PINF || fpv==_FPCLASS_NINF);
 #else
     return std::isinf(x);
 #endif