|
From: <cn...@us...> - 2009-05-12 04:59:32
|
Revision: 230
http://hgengine.svn.sourceforge.net/hgengine/?rev=230&view=rev
Author: cnlohr
Date: 2009-05-12 04:59:31 +0000 (Tue, 12 May 2009)
Log Message:
-----------
cleanup warnings on Win32.
Modified Paths:
--------------
Mercury2/src/MercuryUtil.cpp
Modified: Mercury2/src/MercuryUtil.cpp
===================================================================
--- Mercury2/src/MercuryUtil.cpp 2009-05-12 04:59:03 UTC (rev 229)
+++ Mercury2/src/MercuryUtil.cpp 2009-05-12 04:59:31 UTC (rev 230)
@@ -17,14 +17,22 @@
float StrToFloat(const MString & s, float d)
{
float x = d;
+#if defined( WIN32 ) && !defined( LEAN_HG )
+ if ( s.length() > 0) sscanf_s(s.c_str(), "%f", &x);
+#else
if ( s.length() > 0) sscanf(s.c_str(), "%f", &x);
+#endif
return x;
}
int32_t StrToInt(const MString & s, int32_t d)
{
int32_t x = d;
+#if defined( WIN32 ) && !defined( LEAN_HG )
+ if ( s.length() > 0) sscanf_s(s.c_str(), "%d", &x);
+#else
if ( s.length() > 0) sscanf(s.c_str(), "%d", &x);
+#endif
return x;
}
void* mmemalign(size_t align, size_t size, void*& mem)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|