STYLE: use string substr instead of string::operator()

- makes the purpose clearer.
  In some places, string::resize() is even simpler.

- use C++11 string::back() in preference to str[str.size()-1]
This commit is contained in:
Mark Olesen
2017-07-21 12:30:42 +02:00
parent 72f242405a
commit 8df433860f
26 changed files with 148 additions and 174 deletions

View File

@ -903,10 +903,10 @@ int main(int argc, char *argv[])
}
// Strip off anything after #
string::size_type i = rawLine.find_first_of("#");
string::size_type i = rawLine.find('#');
if (i != string::npos)
{
rawLine = rawLine(0, i);
rawLine.resize(i);
}
if (rawLine.empty())