STYLE: consistent use of '= delete' for removed constructors/assignments

- make the purpose more explicit, and reduces some work for the
  compiler as well.
This commit is contained in:
Mark Olesen
2018-05-30 12:03:17 +02:00
parent 6b6b36afd3
commit f9fe71815a
976 changed files with 3606 additions and 3419 deletions

View File

@ -91,11 +91,11 @@ class cellSplitter
const Map<labelList>& cellToCells
) const;
//- Disallow default bitwise copy construct
cellSplitter(const cellSplitter&);
//- No copy construct
cellSplitter(const cellSplitter&) = delete;
//- Disallow default bitwise assignment
void operator=(const cellSplitter&);
//- No copy assignment
void operator=(const cellSplitter&) = delete;
public:

View File

@ -68,11 +68,11 @@ class edgeStats
direction getNormalDir(const twoDPointCorrector*) const;
//- Disallow default bitwise copy construct
edgeStats(const edgeStats&);
//- No copy construct
edgeStats(const edgeStats&) = delete;
//- Disallow default bitwise assignment
void operator=(const edgeStats&);
//- No copy assignment
void operator=(const edgeStats&) = delete;
public:

View File

@ -74,11 +74,11 @@ class hexBlock
// Private Member Functions
//- Disallow default bitwise copy construct
hexBlock(const hexBlock&);
//- No copy construct
hexBlock(const hexBlock&) = delete;
//- Disallow default bitwise assignment
void operator=(const hexBlock&);
//- No copy assignment
void operator=(const hexBlock&) = delete;
//- Vertex addressing inside the block
inline label vtxLabel(label i, label j, label k) const;

View File

@ -67,11 +67,11 @@ class hexBlock
// Private Member Functions
//- Disallow default bitwise copy construct
hexBlock(const hexBlock&);
//- No copy construct
hexBlock(const hexBlock&) = delete;
//- Disallow default bitwise assignment
void operator=(const hexBlock&);
//- No copy assignment
void operator=(const hexBlock&) = delete;
//- Vertex addressing inside the block
inline label vtxLabel(label i, label j, label k) const;

View File

@ -86,10 +86,10 @@ class extrudedMesh
);
//- Disallow default bitwise copy construct
//- No copy construct
extrudedMesh(const extrudedMesh&) = delete;
//- Disallow default bitwise assignment
//- No copy assignment
void operator=(const extrudedMesh&) = delete;

View File

@ -87,11 +87,11 @@ class extrude2DMesh
//- Find extrusion direction
//void findExtrudeDirection();
//- Disallow default bitwise copy construct
extrude2DMesh(const extrude2DMesh&);
//- No copy construct
extrude2DMesh(const extrude2DMesh&) = delete;
//- Disallow default bitwise assignment
void operator=(const extrude2DMesh&);
//- No copy assignment
void operator=(const extrude2DMesh&) = delete;
public:

View File

@ -85,11 +85,11 @@ class patchToPoly2DMesh
void createPolyMeshComponents();
//- Disallow default bitwise copy construct
patchToPoly2DMesh(const patchToPoly2DMesh&);
//- No copy construct
patchToPoly2DMesh(const patchToPoly2DMesh&) = delete;
//- Disallow default bitwise assignment
void operator=(const patchToPoly2DMesh&);
//- No copy assignment
void operator=(const patchToPoly2DMesh&) = delete;
public:

View File

@ -70,11 +70,11 @@ class cv2DControls
// Private Member Functions
//- Disallow default bitwise copy construct
cv2DControls(const cv2DControls&);
//- No copy construct
cv2DControls(const cv2DControls&) = delete;
//- Disallow default bitwise assignment
void operator=(const cv2DControls&);
//- No copy assignment
void operator=(const cv2DControls&) = delete;
public:

View File

@ -142,11 +142,11 @@ private:
const List<DynamicList<label>>& patchOwners
) const;
//- Disallow default bitwise copy construct
DelaunayMesh(const DelaunayMesh<Triangulation>&);
//- No copy construct
DelaunayMesh(const DelaunayMesh<Triangulation>&) = delete;
//- Disallow default bitwise assignment
void operator=(const DelaunayMesh<Triangulation>&);
//- No copy assignment
void operator=(const DelaunayMesh<Triangulation>&) = delete;
public:

View File

@ -119,11 +119,14 @@ private:
labelPairHashSet& receivedVertices
);
//- Disallow default bitwise copy construct
DistributedDelaunayMesh(const DistributedDelaunayMesh<Triangulation>&);
//- No copy construct
DistributedDelaunayMesh
(
const DistributedDelaunayMesh&
) = delete;
//- Disallow default bitwise assignment
void operator=(const DistributedDelaunayMesh<Triangulation>&);
//- No copy assignment
void operator=(const DistributedDelaunayMesh<Triangulation>&) = delete;
public:

View File

@ -193,22 +193,4 @@ void Foam::PrintTable<KeyType, DataType>::print
}
// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * //
template<class KeyType, class DataType>
void Foam::PrintTable<KeyType, DataType>::operator=
(
const PrintTable<KeyType, DataType>& rhs
)
{
// Check for assignment to self
if (this == &rhs)
{
FatalErrorInFunction
<< "Attempted assignment to self"
<< abort(FatalError);
}
}
// ************************************************************************* //

View File

@ -82,8 +82,8 @@ class PrintTable
// Private Member Functions
//- Disallow default bitwise assignment
void operator=(const PrintTable<KeyType, DataType>&);
//- No copy assignment
void operator=(const PrintTable<KeyType, DataType>&) = delete;
public:
@ -107,7 +107,7 @@ public:
// Member Functions
//- Add an entry (D) to the given key(K)
void add(const KeyType& K, const DataType& D);
inline void add(const KeyType& K, const DataType& D);
//- Print the table
void print

View File

@ -26,7 +26,7 @@ License
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
template<class KeyType, class DataType>
void Foam::PrintTable<KeyType, DataType>::add
inline void Foam::PrintTable<KeyType, DataType>::add
(
const KeyType& K,
const DataType& D
@ -35,8 +35,4 @@ void Foam::PrintTable<KeyType, DataType>::add
table_.set(K, D);
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
// ************************************************************************* //

View File

@ -177,11 +177,14 @@ class backgroundMeshDecomposition
//- Build the surface patch and search tree
void buildPatchAndTree();
//- Disallow default bitwise copy construct
backgroundMeshDecomposition(const backgroundMeshDecomposition&);
//- No copy construct
backgroundMeshDecomposition
(
const backgroundMeshDecomposition&
) = delete;
//- Disallow default bitwise assignment
void operator=(const backgroundMeshDecomposition&);
//- No copy assignment
void operator=(const backgroundMeshDecomposition&) = delete;
public:

View File

@ -61,11 +61,11 @@ class cellAspectRatioControl
// Private Member Functions
//- Disallow default bitwise copy construct
cellAspectRatioControl(const cellAspectRatioControl&);
//- No copy construct
cellAspectRatioControl(const cellAspectRatioControl&) = delete;
//- Disallow default bitwise assignment
void operator=(const cellAspectRatioControl&);
//- No copy assignment
void operator=(const cellAspectRatioControl&) = delete;
public:

View File

@ -85,11 +85,11 @@ class cellShapeControl
// Private Member Functions
//- Disallow default bitwise copy construct
cellShapeControl(const cellShapeControl&);
//- No copy construct
cellShapeControl(const cellShapeControl&) = delete;
//- Disallow default bitwise assignment
void operator=(const cellShapeControl&);
//- No copy assignment
void operator=(const cellShapeControl&) = delete;
public:

View File

@ -83,11 +83,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
cellShapeControlMesh(const cellShapeControlMesh&);
//- No copy construct
cellShapeControlMesh(const cellShapeControlMesh&) = delete;
//- Disallow default bitwise assignment
void operator=(const cellShapeControlMesh&);
//- No copy assignment
void operator=(const cellShapeControlMesh&) = delete;
public:

View File

@ -71,11 +71,14 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
cellSizeAndAlignmentControl(const cellSizeAndAlignmentControl&);
//- No copy construct
cellSizeAndAlignmentControl
(
const cellSizeAndAlignmentControl&
) = delete;
//- Disallow default bitwise assignment
void operator=(const cellSizeAndAlignmentControl&);
//- No copy assignment
void operator=(const cellSizeAndAlignmentControl&) = delete;
public:

View File

@ -68,11 +68,14 @@ class cellSizeAndAlignmentControls
label& maxPriority
) const;
//- Disallow default bitwise copy construct
cellSizeAndAlignmentControls(const cellSizeAndAlignmentControls&);
//- No copy construct
cellSizeAndAlignmentControls
(
const cellSizeAndAlignmentControls&
) = delete;
//- Disallow default bitwise assignment
void operator=(const cellSizeAndAlignmentControls&);
//- No copy assignment
void operator=(const cellSizeAndAlignmentControls&) = delete;
public:

View File

@ -63,11 +63,11 @@ class fileControl
// Private Member Functions
//- Disallow default bitwise copy construct
fileControl(const fileControl&);
//- No copy construct
fileControl(const fileControl&) = delete;
//- Disallow default bitwise assignment
void operator=(const fileControl&);
//- No copy assignment
void operator=(const fileControl&) = delete;
public:

View File

@ -88,11 +88,11 @@ class searchableSurfaceControl
// const vectorField& ptNormals
// ) const;
//- Disallow default bitwise copy construct
searchableSurfaceControl(const searchableSurfaceControl&);
//- No copy construct
searchableSurfaceControl(const searchableSurfaceControl&) = delete;
//- Disallow default bitwise assignment
void operator=(const searchableSurfaceControl&);
//- No copy assignment
void operator=(const searchableSurfaceControl&) = delete;
public:

View File

@ -99,11 +99,11 @@ class controlMeshRefinement
pointHit findDiscontinuities(const linePointRef& l) const;
//- Disallow default bitwise copy construct
controlMeshRefinement(const controlMeshRefinement&);
//- No copy construct
controlMeshRefinement(const controlMeshRefinement&) = delete;
//- Disallow default bitwise assignment
void operator=(const controlMeshRefinement&);
//- No copy assignment
void operator=(const controlMeshRefinement&) = delete;
public:

View File

@ -91,11 +91,11 @@ class smoothAlignmentSolver
triad& t
) const;
//- Disallow default bitwise copy construct
smoothAlignmentSolver(const smoothAlignmentSolver&);
//- No copy construct
smoothAlignmentSolver(const smoothAlignmentSolver&) = delete;
//- Disallow default bitwise assignment
void operator=(const smoothAlignmentSolver&);
//- No copy assignment
void operator=(const smoothAlignmentSolver&) = delete;
public:

View File

@ -110,11 +110,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
cellSizeFunction(const cellSizeFunction&);
//- No copy construct
cellSizeFunction(const cellSizeFunction&) = delete;
//- Disallow default bitwise assignment
void operator=(const cellSizeFunction&);
//- No copy assignment
void operator=(const cellSizeFunction&) = delete;
public:

View File

@ -67,11 +67,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
cellSizeCalculationType(const cellSizeCalculationType&);
//- No copy construct
cellSizeCalculationType(const cellSizeCalculationType&) = delete;
//- Disallow default bitwise assignment
void operator=(const cellSizeCalculationType&);
//- No copy assignment
void operator=(const cellSizeCalculationType&) = delete;
public:

View File

@ -75,11 +75,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
surfaceCellSizeFunction(const surfaceCellSizeFunction&);
//- No copy construct
surfaceCellSizeFunction(const surfaceCellSizeFunction&) = delete;
//- Disallow default bitwise assignment
void operator=(const surfaceCellSizeFunction&);
//- No copy assignment
void operator=(const surfaceCellSizeFunction&) = delete;
public:

View File

@ -850,11 +850,11 @@ private:
void writePointPairs(const fileName& fName) const;
//- Disallow default bitwise copy construct
conformalVoronoiMesh(const conformalVoronoiMesh&);
//- No copy construct
conformalVoronoiMesh(const conformalVoronoiMesh&) = delete;
//- Disallow default bitwise assignment
void operator=(const conformalVoronoiMesh&);
//- No copy assignment
void operator=(const conformalVoronoiMesh&) = delete;
public:

View File

@ -133,11 +133,11 @@ class featurePointConformer
//- Create the points that will conform to the feature
void createFeaturePoints(DynamicList<Vb>& pts);
//- Disallow default bitwise copy construct
featurePointConformer(const featurePointConformer&);
//- No copy construct
featurePointConformer(const featurePointConformer&) = delete;
//- Disallow default bitwise assignment
void operator=(const featurePointConformer&);
//- No copy assignment
void operator=(const featurePointConformer&) = delete;
public:

View File

@ -125,11 +125,11 @@ class conformationSurfaces
label& featureIndex
);
//- Disallow default bitwise copy construct
conformationSurfaces(const conformationSurfaces&);
//- No copy construct
conformationSurfaces(const conformationSurfaces&) = delete;
//- Disallow default bitwise assignment
void operator=(const conformationSurfaces&);
//- No copy assignment
void operator=(const conformationSurfaces&) = delete;
public:

View File

@ -209,11 +209,11 @@ class cvControls
// Private Member Functions
//- Disallow default bitwise copy construct
cvControls(const cvControls&);
//- No copy construct
cvControls(const cvControls&) = delete;
//- Disallow default bitwise assignment
void operator=(const cvControls&);
//- No copy assignment
void operator=(const cvControls&) = delete;
public:

View File

@ -68,11 +68,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
faceAreaWeightModel(const faceAreaWeightModel&);
//- No copy construct
faceAreaWeightModel(const faceAreaWeightModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const faceAreaWeightModel&);
//- No copy assignment
void operator=(const faceAreaWeightModel&) = delete;
public:

View File

@ -87,11 +87,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
initialPointsMethod(const initialPointsMethod&);
//- No copy construct
initialPointsMethod(const initialPointsMethod&) = delete;
//- Disallow default bitwise assignment
void operator=(const initialPointsMethod&);
//- No copy assignment
void operator=(const initialPointsMethod&) = delete;
public:

View File

@ -70,11 +70,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
relaxationModel(const relaxationModel&);
//- No copy construct
relaxationModel(const relaxationModel&) = delete;
//- Disallow default bitwise assignment
void operator=(const relaxationModel&);
//- No copy assignment
void operator=(const relaxationModel&) = delete;
public:

View File

@ -59,11 +59,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
searchableBoxFeatures(const searchableBoxFeatures&);
//- No copy construct
searchableBoxFeatures(const searchableBoxFeatures&) = delete;
//- Disallow default bitwise assignment
void operator=(const searchableBoxFeatures&);
//- No copy assignment
void operator=(const searchableBoxFeatures&) = delete;
public:

View File

@ -63,11 +63,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
searchablePlateFeatures(const searchablePlateFeatures&);
//- No copy construct
searchablePlateFeatures(const searchablePlateFeatures&) = delete;
//- Disallow default bitwise assignment
void operator=(const searchablePlateFeatures&);
//- No copy assignment
void operator=(const searchablePlateFeatures&) = delete;
public:

View File

@ -60,11 +60,11 @@ class searchableSurfaceFeatures
// Private Member Functions
//- Disallow default bitwise copy construct
searchableSurfaceFeatures(const searchableSurfaceFeatures&);
//- No copy construct
searchableSurfaceFeatures(const searchableSurfaceFeatures&) = delete;
//- Disallow default bitwise assignment
void operator=(const searchableSurfaceFeatures&);
//- No copy assignment
void operator=(const searchableSurfaceFeatures&) = delete;
public:

View File

@ -61,11 +61,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
triSurfaceMeshFeatures(const triSurfaceMeshFeatures&);
//- No copy construct
triSurfaceMeshFeatures(const triSurfaceMeshFeatures&) = delete;
//- Disallow default bitwise assignment
void operator=(const triSurfaceMeshFeatures&);
//- No copy assignment
void operator=(const triSurfaceMeshFeatures&) = delete;
public:

View File

@ -199,11 +199,11 @@ private:
// Private Member Functions
//- Disallow default bitwise copy construct
CV2D(const CV2D&);
//- No copy construct
CV2D(const CV2D&) = delete;
//- Disallow default bitwise assignment
void operator=(const CV2D&);
//- No copy assignment
void operator=(const CV2D&) = delete;
//- Insert point and return it's index

View File

@ -90,11 +90,11 @@ class shortEdgeFilter2D
labelList& patchSizes
) const;
//- Disallow default bitwise copy construct
shortEdgeFilter2D(const shortEdgeFilter2D&);
//- No copy construct
shortEdgeFilter2D(const shortEdgeFilter2D&) = delete;
//- Disallow default bitwise assignment
void operator=(const shortEdgeFilter2D&);
//- No copy assignment
void operator=(const shortEdgeFilter2D&) = delete;
public:

View File

@ -76,10 +76,10 @@ class mergePolyMesh
// Private Member Functions
//- Disallow default bitwise copy construct
//- No copy construct
mergePolyMesh(const mergePolyMesh&) = delete;
//- Disallow default bitwise assignment
//- No copy assignment
void operator=(const mergePolyMesh&) = delete;

View File

@ -60,10 +60,10 @@ class mirrorFvMesh
// Private Member Functions
//- Disallow copy construct
//- No copy construct
mirrorFvMesh(const mirrorFvMesh&) = delete;
//- Disallow copy assignment
//- No copy assignment
void operator=(const mirrorFvMesh&) = delete;

View File

@ -168,11 +168,11 @@ class meshDualiser
boolList& donePFaces // pFaces visited
) const;
//- Disallow default bitwise copy construct
meshDualiser(const meshDualiser&);
//- No copy construct
meshDualiser(const meshDualiser&) = delete;
//- Disallow default bitwise assignment
void operator=(const meshDualiser&);
//- No copy assignment
void operator=(const meshDualiser&) = delete;
public: