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:
parent
a422e43beb
commit
8f57c9a6c7
@ -124,7 +124,7 @@ ValueType TPTScriptInterface::testType(std::string word)
|
||||
return TypeString;
|
||||
}
|
||||
|
||||
float TPTScriptInterface::parseNumber(char * stringData)
|
||||
int TPTScriptInterface::parseNumber(char * stringData)
|
||||
{
|
||||
char cc;
|
||||
int base = 10;
|
||||
|
@ -7,7 +7,7 @@
|
||||
class TPTScriptInterface: public CommandInterface {
|
||||
protected:
|
||||
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_create(std::deque<std::string> * words);
|
||||
AnyType tptS_delete(std::deque<std::string> * words);
|
||||
|
Reference in New Issue
Block a user