ENH: replace base implementation of Foam::Swap with std::swap

- eliminates a potentially invalid code branch.
  Since it essentially had the same internals as std::swap anyhow,
  make that more evident.

ENH: use std::swap for basic types

- makes it clearer that they do not rely on any special semantics
This commit is contained in:
Mark Olesen
2021-02-16 10:18:16 +01:00
parent 8c460d8ec9
commit f8a0677a66
30 changed files with 108 additions and 113 deletions

View File

@ -6,7 +6,7 @@
\\/ M anipulation |
-------------------------------------------------------------------------------
Copyright (C) 2011-2016 OpenFOAM Foundation
Copyright (C) 2019 OpenCFD Ltd.
Copyright (C) 2019-2021 OpenCFD Ltd.
-------------------------------------------------------------------------------
License
This file is part of OpenFOAM.
@ -756,8 +756,8 @@ void Foam::createShellMesh::setRefinement
if (minCelli > maxCelli)
{
// Swap
Swap(minCelli, maxCelli);
newF = newF.reverseFace();
std::swap(minCelli, maxCelli);
newF.flip();
}
patchi = -1;
}