Mesh: C++ core guidelines

This commit is contained in:
wmayer
2023-09-25 20:43:31 +02:00
committed by wwmayer
parent dca598f4e5
commit a364141c58
99 changed files with 984 additions and 597 deletions

View File

@@ -40,7 +40,18 @@ Edge::Edge() // NOLINT
}
}
Edge::Edge(const Edge& e)
Edge::Edge(const Edge& e) // NOLINT
: MeshCore::MeshGeomEdge(e)
, Index(e.Index)
, Mesh(e.Mesh)
{
for (int i = 0; i < 2; i++) {
PIndex[i] = e.PIndex[i];
NIndex[i] = e.NIndex[i];
}
}
Edge::Edge(Edge&& e) // NOLINT
: MeshCore::MeshGeomEdge(e)
, Index(e.Index)
, Mesh(e.Mesh)
@@ -53,7 +64,7 @@ Edge::Edge(const Edge& e)
Edge::~Edge() = default;
void Edge::operator=(const Edge& e)
Edge& Edge::operator=(const Edge& e)
{
MeshCore::MeshGeomEdge::operator=(e);
Mesh = e.Mesh;
@@ -62,6 +73,21 @@ void Edge::operator=(const Edge& e)
PIndex[i] = e.PIndex[i];
NIndex[i] = e.NIndex[i];
}
return *this;
}
Edge& Edge::operator=(Edge&& e)
{
MeshCore::MeshGeomEdge::operator=(e);
Mesh = e.Mesh;
Index = e.Index;
for (int i = 0; i < 2; i++) {
PIndex[i] = e.PIndex[i];
NIndex[i] = e.NIndex[i];
}
return *this;
}
void Edge::unbound()