Commit 6a172976 authored by Kirill Terekhov's avatar Kirill Terekhov

Small fix

Add const to argument to UniteCells, UniteFaces, UniteEdges
parent 919a5923
......@@ -542,7 +542,7 @@ namespace INMOST
Node getBeg () const;
Node getEnd () const;
//implemented in modify.cpp
static Edge UniteEdges (ElementArray<Edge> & edges, MarkerType del_protect);
static Edge UniteEdges (const ElementArray<Edge> & edges, MarkerType del_protect);
static bool TestUniteEdges (const ElementArray<Edge> & edges, MarkerType del_protect);
static ElementArray<Edge> SplitEdge (Edge e, const ElementArray<Node> & nodes, MarkerType del_protect); //provide ordered array of nodes, that lay between former nodes of the edge
static bool TestSplitEdge (Edge e, const ElementArray<Node> & nodes, MarkerType del_protect);
......@@ -621,7 +621,7 @@ namespace INMOST
bool CheckEdgeOrder () const; //not implemented// returns true if edges of face form an ordered closed loop
bool FixEdgeOrder () const; //not implemented// returns true if edges were successfully reordered to form a closed loop
//implemented in modify.cpp
static Face UniteFaces (ElementArray<Face> & faces, MarkerType del_protect);
static Face UniteFaces (const ElementArray<Face> & faces, MarkerType del_protect);
static bool TestUniteFaces (const ElementArray<Face> & faces, MarkerType del_protect);
static ElementArray<Face> SplitFace (Face face, const ElementArray<Edge> & edges, MarkerType del_protect); //provide all edges that lay inside face
static bool TestSplitFace (Face face, const ElementArray<Edge> & edges, MarkerType del_protect);
......@@ -854,7 +854,7 @@ namespace INMOST
/// @param cells A set of cells to be united.
/// @param del_protect A marker that protects elements from deletion. Zero means no check.
/// @return A new cell.
static Cell UniteCells (ElementArray<Cell> & cells, MarkerType del_protect);
static Cell UniteCells (const ElementArray<Cell> & cells, MarkerType del_protect);
/// \brief Test that no marked element will be deleted during union of given cells.
/// @param cells A set of cells to be united.
/// @param del_protect A marker that protects elements from deletion. Zero means no check.
......
......@@ -129,7 +129,7 @@ namespace INMOST
lc.clear();
}
Cell Cell::UniteCells(ElementArray<Cell> & unite, MarkerType del_protect)
Cell Cell::UniteCells(const ElementArray<Cell> & unite, MarkerType del_protect)
{
Mesh * m = unite.GetMeshLink();
if( unite.empty() ) return Cell(m,InvalidHandle());
......@@ -388,9 +388,9 @@ namespace INMOST
}
Face Face::UniteFaces(ElementArray<Face> & unite, MarkerType del_protect)
Face Face::UniteFaces(const ElementArray<Face> & unite, MarkerType del_protect)
{
Mesh * m = unite.GetMeshLink();
Mesh * m = const_cast<Mesh *>(unite.GetMeshLink());
assert(m != NULL);
if( unite.empty() ) return Face(m,InvalidHandle());
MarkerType hm = m->HideMarker();
......@@ -677,7 +677,7 @@ namespace INMOST
bool Face::TestUniteFaces(const ElementArray<Face> & unite, MarkerType del_protect)
{
Mesh * m = unite.GetMeshLink();
Mesh * m = const_cast<Mesh *>(unite.GetMeshLink());
if( unite.size() == 0 ) return false;
bool doexit = false, dothrow = false;
for(ElementArray<Face>::size_type j = 0; j < unite.size(); j++)
......@@ -749,9 +749,9 @@ namespace INMOST
return true;
}
Edge Edge::UniteEdges(ElementArray<Edge> & edges, MarkerType del_protect)
Edge Edge::UniteEdges(const ElementArray<Edge> & edges, MarkerType del_protect)
{
Mesh * m = edges.GetMeshLink();
Mesh * m = const_cast<Mesh *>(edges.GetMeshLink());
if( edges.size() == 0 ) return Edge(m,InvalidHandle());
bool doexit = false, dothrow = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment