Skip to content
Snippets Groups Projects
Commit e30dc962 authored by Mark OLESEN's avatar Mark OLESEN Committed by Andrew Heather
Browse files

STYLE: unnecessary read-check in ccm::writer

parent 4b39c9f1
No related branches found
No related tags found
No related merge requests found
...@@ -450,21 +450,14 @@ void Foam::ccm::writer::writeSolution ...@@ -450,21 +450,14 @@ void Foam::ccm::writer::writeSolution
forAllConstIters(objects, iter) forAllConstIters(objects, iter)
{ {
word fieldName = (*iter()).name(); const word fieldName = (*iter()).name();
bool variableGood = const word fieldType = (*iter()).headerClassName();
(
nameMapping.found(fieldName)
&& (*iter()).typeHeaderOk<volScalarField>(false)
);
if (!variableGood) if (!nameMapping.found(fieldName))
{ {
// Only retain registered fields that are also readable
continue; continue;
} }
word fieldType = (*iter()).headerClassName();
if (fieldType == volScalarField::typeName) if (fieldType == volScalarField::typeName)
{ {
Info<< " " << fieldName << flush; Info<< " " << fieldName << flush;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment