C++11 conformance and consistency: Added "move" constructors and assignment operators to OpenFOAM containers
Replaced all uses of complex Xfer class with C++11 "move" constructors and assignment operators. Removed the now redundant Xfer class. This substantial changes improves consistency between OpenFOAM and the C++11 STL containers and algorithms, reduces memory allocation and copy overhead when returning containers from functions and simplifies maintenance of the core libraries significantly.
This commit is contained in:
@ -357,9 +357,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
facesInstance(),
|
||||
processorDb
|
||||
),
|
||||
xferMove(facesInstancePoints),
|
||||
xferMove(procFaces),
|
||||
xferMove(procCells)
|
||||
move(facesInstancePoints),
|
||||
move(procFaces),
|
||||
move(procCells)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -375,9 +375,9 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
facesInstance(),
|
||||
processorDb
|
||||
),
|
||||
xferMove(procPoints),
|
||||
xferMove(procFaces),
|
||||
xferMove(procCells)
|
||||
move(procPoints),
|
||||
move(procFaces),
|
||||
move(procCells)
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -758,7 +758,7 @@ bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets)
|
||||
IOobject::NO_WRITE,
|
||||
false
|
||||
),
|
||||
xferMove(procPoints)
|
||||
move(procPoints)
|
||||
);
|
||||
pointsInstancePoints.write();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user