STYLE: prefer isHeaderClass<Type>() check instead of Type::typeName

- use typeHeaderOk<regIOobject>(false) for some generic file existence
  checks. Often had something like labelIOField as a placeholder, but
  that may be construed to have a particular something.
This commit is contained in:
Mark Olesen
2023-05-12 10:08:17 +02:00
parent bdd384c767
commit f41d1879b9
15 changed files with 80 additions and 84 deletions

View File

@ -52,9 +52,9 @@ autoPtr<GeoFieldType> loadField
const IOobject* io
)
{
if (io && io->headerClassName() == GeoFieldType::typeName)
if (io && io->isHeaderClass<GeoFieldType>())
{
Info<< "Reading " << GeoFieldType::typeName
Info<< "Reading " << io->headerClassName()
<< ' ' << io->name() << endl;
return autoPtr<GeoFieldType>::New