mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge branch 'style-string-access' into 'develop'
Consistent use of string methods See merge request !128
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user