From: <lpa...@us...> - 2013-05-02 18:16:28
|
Revision: 8702 http://planeshift.svn.sourceforge.net/planeshift/?rev=8702&view=rev Author: lpancallo Date: 2013-05-02 18:16:21 +0000 (Thu, 02 May 2013) Log Message: ----------- Fixed compilation errors on Windows. this line needs to be reviewed/changed: errno = 0; Modified Paths: -------------- trunk/src/common/util/strutil.h Modified: trunk/src/common/util/strutil.h =================================================================== --- trunk/src/common/util/strutil.h 2013-05-01 15:52:42 UTC (rev 8701) +++ trunk/src/common/util/strutil.h 2013-05-02 18:16:21 UTC (rev 8702) @@ -111,7 +111,9 @@ const char* toConvert = Get(wordNum).GetDataSafe(); char* endPtr = const_cast<char*>(toConvert); - errno = 0; /* To distinguish success/failure after call */ + // TOFIX: gives the following error on windows: + // error C2106: '=' : left operand must be l-value + //errno = 0; /* To distinguish success/failure after call */ strtol(toConvert, &endPtr, 10); // 10 base // Check for error situations @@ -158,10 +160,12 @@ bool IsFloat(size_t wordNum) const { const char* toConvert = Get(wordNum).GetDataSafe(); - char* endPtr = const_cast<char*>(toConvert); + const char* endPtr = const_cast<char*>(toConvert); - errno = 0; /* To distinguish success/failure after call */ - strtof(toConvert, &endPtr); + // TOFIX: gives the following error on windows: + // error C2106: '=' : left operand must be l-value + // errno = 0; /* To distinguish success/failure after call */ + CS::Utility::strtof(toConvert, &endPtr); // Check for error situations if (errno != 0) return false; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |