mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: prefer autoPtr::reset() to autoPtr::set()
- in most cases already checked valid() so don't need additional check for setting an existing pointer
This commit is contained in:
@ -231,7 +231,7 @@ Foam::autoPtr<Foam::triSurface> Foam::triSurfaceLoader::load
|
||||
else if (selected_.size() == 1)
|
||||
{
|
||||
// Use scaling (if any)
|
||||
output.set(new triSurface(directory_/selected_[0], scaleFactor));
|
||||
output.reset(new triSurface(directory_/selected_[0], scaleFactor));
|
||||
|
||||
triSurface& surf = output();
|
||||
|
||||
@ -400,7 +400,7 @@ Foam::autoPtr<Foam::triSurface> Foam::triSurfaceLoader::load
|
||||
points *= scaleFactor;
|
||||
}
|
||||
|
||||
output.set(new triSurface(faces, patches, points, true));
|
||||
output.reset(new triSurface(faces, patches, points, true));
|
||||
|
||||
return output;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user