functionObjects::fieldExpression: fieldName is now const as it cannot be changed after construction

This commit is contained in:
Henry Weller
2019-11-29 16:54:54 +00:00
parent 8a6800abfe
commit da50aba2c4
5 changed files with 6 additions and 12 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2016-2018 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -41,10 +41,8 @@ bool Foam::functionObjects::components::calcFieldComponents()
for (direction i=0; i<Type::nComponents; i++)
{
resultName_ = fieldName_ + word(Type::componentNames[i]);
resultNames_[i] = resultName_;
stored = stored && store(resultName_, field.component(i));
resultNames_[i] = fieldName_ + word(Type::componentNames[i]);
stored = stored && store(resultNames_[i], field.component(i));
}
return stored;