]> git.stg.codes - stg.git/blobdiff - stglibs/common.lib/common.cpp
Added specialization of str2x for doubles.
[stg.git] / stglibs / common.lib / common.cpp
index d91c17956755bfb008d800dcac5fccac2ffe0f55..8b62e68b0fad70adfd55e8c4c445c1b352c0b43a 100644 (file)
@@ -752,6 +752,11 @@ if (errno == ERANGE)
 
 return 0;
 }
+//---------------------------------------------------------------------------
+int str2x(const std::string & str, double & x)
+{
+return strtodouble2(str.c_str(), x);
+}
 #ifndef WIN32
 //---------------------------------------------------------------------------
 int str2x(const std::string & str, int64_t & x)
@@ -899,7 +904,7 @@ strncpy(inBuf, source.c_str(), source.length());
 
 inBuf[source.length()] = 0;
 
-#if defined(FREE_BSD) || defined(FREE_BSD5) || defined(WIN32)
+#if defined(CONST_ICONV)
 const char * srcPos = inBuf;
 #else
 char * srcPos = inBuf;