ENH: use string endsWith in a few places

fieldName.endsWith("_0")
vs
    fieldName.size() > 2 && fieldName(fieldName.size()-2, 2) == "_0"
This commit is contained in:
Mark Olesen
2016-12-18 23:58:45 +01:00
parent 2b14360662
commit 7b4680482e
3 changed files with 5 additions and 13 deletions

View File

@ -11,9 +11,8 @@ if (!fieldsToUse.found(fieldName))
{
variableGood =
(
fieldName.size() > 2 && fieldName(fieldName.size()-2, 2) == "_0"
? false
: IOobject
!fieldName.endsWith("_0")
&& IOobject
(
fieldName,
timeDirs[n1].name(),