* sorted out some 64bit compatibility issues
This commit is contained in:
parent
1a9e5588d5
commit
f71dc0bd3f
@ -274,7 +274,6 @@ bool DefScriptPackage::LoadScriptFromFile(std::string fn){
|
||||
absline++;
|
||||
if(line.empty())
|
||||
continue; // line is empty, proceed with next line
|
||||
|
||||
while( !line.empty() && (line.at(0)==' ' || line.at(0)=='\t') )
|
||||
line.erase(0,1);
|
||||
//while( !line.empty() && (line.at(line.length()-1)==13 || line.at(line.length()-1)==10) )
|
||||
@ -287,7 +286,7 @@ bool DefScriptPackage::LoadScriptFromFile(std::string fn){
|
||||
if(line_strip)
|
||||
{
|
||||
// strip comments at the end of the line
|
||||
unsigned int cmpos = 0;
|
||||
size_t cmpos = 0;
|
||||
while(true)
|
||||
{
|
||||
// note: this must also cover lines like: "out blah \// no-comment // comment"
|
||||
|
||||
@ -55,7 +55,7 @@ ldbl DefScriptTools::toNumber(std::string str)
|
||||
str.erase(0,1);
|
||||
negative=true;
|
||||
}
|
||||
unsigned int ppos=str.find('.');
|
||||
size_t ppos=str.find('.');
|
||||
str=stringToUpper(str);
|
||||
|
||||
if(str.length() > 2 && str[0]=='0' && str[1]=='X')
|
||||
@ -137,13 +137,13 @@ uint64 DefScriptTools::toUint64(std::string str)
|
||||
|
||||
uint64 DefScriptTools::atoi64(std::string str)
|
||||
{
|
||||
uint64 l = 0;
|
||||
for (size_t i = 0; i < str.size(); i++)
|
||||
{
|
||||
if(!isdigit(str[i]))
|
||||
return l;
|
||||
l = l * 10 + str[i] - 48;
|
||||
}
|
||||
uint64 l = 0;
|
||||
for (size_t i = 0; i < str.size(); i++)
|
||||
{
|
||||
if(!isdigit(str[i]))
|
||||
return l;
|
||||
l = l * 10 + str[i] - 48;
|
||||
}
|
||||
return l;
|
||||
}
|
||||
|
||||
|
||||
@ -206,7 +206,7 @@ uint32 SCPDatabaseMgr::AutoLoadFile(const char *fn)
|
||||
line.clear();
|
||||
continue;
|
||||
}
|
||||
uint32 eq = line.find("=");
|
||||
size_t eq = line.find("=");
|
||||
if(eq != std::string::npos)
|
||||
{
|
||||
entry=stringToLower(line.substr(0,eq));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user