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:
@ -186,7 +186,7 @@ void Foam::ensightSurfaceReader::readCase(IFstream& is)
|
||||
// surfaceName.****.fieldName
|
||||
// This is not parser friendly - simply take remainder of buffer
|
||||
label iPos = iss.stdStream().tellg();
|
||||
fieldFileName = buffer(iPos, buffer.size() - iPos);
|
||||
fieldFileName = buffer.substr(iPos);
|
||||
size_t p0 = fieldFileName.find_first_not_of(' ');
|
||||
if (p0 == string::npos)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user