Merge branch 'style-string-access' into 'develop'

Consistent use of string methods

See merge request !128
This commit is contained in:
Mark Olesen
2017-07-21 16:04:35 +01:00
38 changed files with 418 additions and 190 deletions

View File

@ -74,7 +74,7 @@ bool Foam::fileFormats::NASedgeFormat::read
// Check if character 72 is continuation
if (line.size() > 72 && line[72] == '+')
{
line = line.substr(0, 72);
line.resize(72);
while (true)
{
@ -87,7 +87,7 @@ bool Foam::fileFormats::NASedgeFormat::read
}
else
{
line += buf.substr(8, buf.size()-8);
line += buf.substr(8);
break;
}
}

View File

@ -117,9 +117,9 @@ bool Foam::fileFormats::OBJedgeFormat::read(const fileName& filename)
string line = this->getLineNoComment(is);
// handle continuations
if (line[line.size()-1] == '\\')
if (line.back() == '\\')
{
line.substr(0, line.size()-1);
line.resize(line.size()-1);
line += this->getLineNoComment(is);
}