ENH: construct string types from Istream now explicit (#1033)

- this helps for trapping unguarded dictionary lookups.
This commit is contained in:
Mark Olesen
2018-11-03 20:24:34 +01:00
parent 552682ec03
commit 50baac3c45
65 changed files with 189 additions and 244 deletions

View File

@ -122,46 +122,29 @@ int main(int argc, char *argv[])
{
if (nameMap.found(starFieldNames[i]))
{
IOobject io
(
nameMap.get<word>(starFieldNames[i]),
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
);
if (starFieldNames[i] == "SU")
{
vFields[i] =
new volVectorField
(
IOobject
(
nameMap.lookup(starFieldNames[i]),
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
vFields[i] = new volVectorField(io, mesh);
i += 3;
}
else
{
sFields[i] =
new volScalarField
(
IOobject
(
nameMap.lookup(starFieldNames[i]),
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);
i++;
sFields[i] = new volScalarField(io, mesh);
++i;
}
}
else
{
i++;
++i;
}
}