Correct return type for TPTScriptInterface::parseInt

so that large integers don't get changed into slightly different values by rounding caused by conversion to a float and back again.
This commit is contained in:
jacksonmj
2015-03-01 15:49:21 +00:00
parent a422e43beb
commit 8f57c9a6c7
2 changed files with 2 additions and 2 deletions

View File

@@ -124,7 +124,7 @@ ValueType TPTScriptInterface::testType(std::string word)
return TypeString; return TypeString;
} }
float TPTScriptInterface::parseNumber(char * stringData) int TPTScriptInterface::parseNumber(char * stringData)
{ {
char cc; char cc;
int base = 10; int base = 10;

View File

@@ -7,7 +7,7 @@
class TPTScriptInterface: public CommandInterface { class TPTScriptInterface: public CommandInterface {
protected: protected:
AnyType eval(std::deque<std::string> * words); AnyType eval(std::deque<std::string> * words);
float parseNumber(char * stringData); int parseNumber(char * stringData);
AnyType tptS_set(std::deque<std::string> * words); AnyType tptS_set(std::deque<std::string> * words);
AnyType tptS_create(std::deque<std::string> * words); AnyType tptS_create(std::deque<std::string> * words);
AnyType tptS_delete(std::deque<std::string> * words); AnyType tptS_delete(std::deque<std::string> * words);