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

@ -194,13 +194,13 @@ int main(int argc, char *argv[])
printInfo("dlC", dlC, true);
List<label> lstB(dlC.xfer());
List<label> lstB(std::move(dlC));
Info<< "Transferred to normal list via the xfer() method" << endl;
Info<< "Move construct to normal list" << endl;
printInfo("lstB", lstB, true);
printInfo("dlC", dlC, true);
DynamicList<label> dlD(lstB.xfer());
DynamicList<label> dlD(std::move(lstB));
Info<< "Transfer construct from normal list" << endl;
printInfo("lstB", lstB, true);
@ -279,7 +279,7 @@ int main(int argc, char *argv[])
Info<< "list in: " << flatOutput(list1) << nl
<< "list out: " << flatOutput(list2) << endl;
input2 = std::move(identity(15));
input2 = identity(15); // don't need std::move() on temporary object
list2 = std::move(input2);
Info<< "list in: " << flatOutput(input2) << nl
<< "list out: " << flatOutput(list2) << endl;