Fix StandAlone.cpp compilation warnings
find_first_of returns size_t, was overflowing int.
This commit is contained in:
parent
652db16ff1
commit
b97b25e40b
1 changed files with 2 additions and 2 deletions
|
|
@ -176,7 +176,7 @@ public:
|
||||||
fixLine(def);
|
fixLine(def);
|
||||||
|
|
||||||
// The first "=" needs to turn into a space
|
// The first "=" needs to turn into a space
|
||||||
int equal = def.find_first_of("=");
|
const size_t equal = def.find_first_of("=");
|
||||||
if (equal != def.npos)
|
if (equal != def.npos)
|
||||||
def[equal] = ' ';
|
def[equal] = ' ';
|
||||||
|
|
||||||
|
|
@ -197,7 +197,7 @@ protected:
|
||||||
void fixLine(std::string& line)
|
void fixLine(std::string& line)
|
||||||
{
|
{
|
||||||
// Can't go past a newline in the line
|
// Can't go past a newline in the line
|
||||||
int end = line.find_first_of("\n");
|
const size_t end = line.find_first_of("\n");
|
||||||
if (end != line.npos)
|
if (end != line.npos)
|
||||||
line = line.substr(0, end);
|
line = line.substr(0, end);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue