ENH: polyBoundaryMeshEntries - respect IOobject read flags

This commit is contained in:
Andrew Heather
2018-01-11 14:19:39 +00:00
parent a1e5e4abcb
commit eedb266c72

View File

@ -63,9 +63,19 @@ public:
explicit polyBoundaryMeshEntries(const IOobject& io)
:
regIOobject(io),
PtrList<entry>(readStream(typeName))
PtrList<entry>()
{
close();
if
(
(
io.readOpt() == IOobject::MUST_READ
|| io.readOpt() == IOobject::MUST_READ_IF_MODIFIED
)
|| (io.readOpt() == IOobject::READ_IF_PRESENT && headerOk())
)
{
readStream(typeName) >> *this;
}
}