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

@ -86,16 +86,13 @@ Foam::surfaceFeaturesExtraction::extractFromFile::features
<< "Selecting edges based purely on geometric tests: "
<< geometricTestOnly().c_str() << endl;
return autoPtr<surfaceFeatures>
return autoPtr<surfaceFeatures>::New
(
new surfaceFeatures
(
surf,
eMesh.points(),
eMesh.edges(),
1e-6, // mergeTol
geometricTestOnly()
)
surf,
eMesh.points(),
eMesh.edges(),
1e-6, // mergeTol
geometricTestOnly()
);
}

View File

@ -73,7 +73,7 @@ Foam::surfaceFeaturesExtraction::extractFromNone::features
const triSurface& surf
) const
{
return autoPtr<surfaceFeatures>(new surfaceFeatures(surf));
return autoPtr<surfaceFeatures>::New(surf);
}

View File

@ -80,16 +80,13 @@ Foam::surfaceFeaturesExtraction::extractFromSurface::features
<< "Selecting edges based purely on geometric tests: "
<< geometricTestOnly().c_str() << endl;
return autoPtr<surfaceFeatures>
return autoPtr<surfaceFeatures>::New
(
new surfaceFeatures
(
surf,
includedAngle(),
0, // minLen
0, // minElems
geometricTestOnly()
)
surf,
includedAngle(),
0, // minLen
0, // minElems
geometricTestOnly()
);
}