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:
@ -210,7 +210,7 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
{
|
||||
if (argLevel == 0)
|
||||
{
|
||||
funcName = funcNameArgs(start, i - start);
|
||||
funcName = funcNameArgs.substr(start, i - start);
|
||||
start = i+1;
|
||||
}
|
||||
++argLevel;
|
||||
@ -226,7 +226,7 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
Tuple2<word, string>
|
||||
(
|
||||
argName,
|
||||
funcNameArgs(start, i - start)
|
||||
funcNameArgs.substr(start, i - start)
|
||||
)
|
||||
);
|
||||
namedArg = false;
|
||||
@ -235,7 +235,10 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
{
|
||||
args.append
|
||||
(
|
||||
string::validate<word>(funcNameArgs(start, i - start))
|
||||
string::validate<word>
|
||||
(
|
||||
funcNameArgs.substr(start, i - start)
|
||||
)
|
||||
);
|
||||
}
|
||||
start = i+1;
|
||||
@ -252,7 +255,11 @@ bool Foam::functionObjectList::readFunctionObject
|
||||
}
|
||||
else if (c == '=')
|
||||
{
|
||||
argName = string::validate<word>(funcNameArgs(start, i - start));
|
||||
argName = string::validate<word>
|
||||
(
|
||||
funcNameArgs.substr(start, i - start)
|
||||
);
|
||||
|
||||
start = i+1;
|
||||
namedArg = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user