STYLE: use autoPtr::New and tmp::New for simple return types

This commit is contained in:
Mark Olesen
2018-02-26 14:00:30 +01:00
parent 52b36f84b5
commit 57291e8692
196 changed files with 555 additions and 879 deletions

View File

@ -55,22 +55,19 @@ autoPtr<GeoFieldType> loadField
Info<< "Reading " << GeoFieldType::typeName
<< ' ' << io->name() << endl;
return autoPtr<GeoFieldType>
return autoPtr<GeoFieldType>::New
(
new GeoFieldType
IOobject
(
IOobject
(
io->name(),
io->instance(),
io->local(),
io->db(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE,
io->registerObject()
),
mesh
)
io->name(),
io->instance(),
io->local(),
io->db(),
IOobject::MUST_READ,
IOobject::AUTO_WRITE,
io->registerObject()
),
mesh
);
}