mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: construct string types from Istream now explicit (#1033)
- this helps for trapping unguarded dictionary lookups.
This commit is contained in:
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user