mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
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:
@ -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())
|
||||
|
||||
Reference in New Issue
Block a user