ENH: remove reliance on the Xfer class (issue #639)

This class is largely a pre-C++11 holdover. It is now possible to
simply use move construct/assignment directly.

In a few rare cases (eg, polyMesh::resetPrimitives) it has been
replaced by an autoPtr.
This commit is contained in:
Mark Olesen
2018-03-05 13:28:53 +01:00
parent 57291e8692
commit 3d608bf06a
241 changed files with 3106 additions and 3971 deletions

View File

@ -340,38 +340,32 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
curPointLabels
);
procMeshPtr.reset
procMeshPtr = autoPtr<polyMesh>::New
(
new polyMesh
IOobject
(
IOobject
(
this->polyMesh::name(), // region of undecomposed mesh
facesInstance(),
processorDb
),
xferMove(facesInstancePoints),
xferMove(procFaces),
xferMove(procCells)
)
this->polyMesh::name(), // region of undecomposed mesh
facesInstance(),
processorDb
),
std::move(facesInstancePoints),
std::move(procFaces),
std::move(procCells)
);
}
else
{
procMeshPtr.reset
procMeshPtr = autoPtr<polyMesh>::New
(
new polyMesh
IOobject
(
IOobject
(
this->polyMesh::name(), // region of undecomposed mesh
facesInstance(),
processorDb
),
xferMove(procPoints),
xferMove(procFaces),
xferMove(procCells)
)
this->polyMesh::name(), // region of undecomposed mesh
facesInstance(),
processorDb
),
std::move(procPoints),
std::move(procFaces),
std::move(procCells)
);
}
polyMesh& procMesh = procMeshPtr();
@ -751,7 +745,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
IOobject::NO_WRITE,
false
),
xferMove(procPoints)
std::move(procPoints)
);
pointsInstancePoints.write();
}