Commit 1f2800ce authored by Martin Heistermann's avatar Martin Heistermann

Avoid potential side effects in assert().

parent c602ccf5
Pipeline #10522 passed with stage
in 5 minutes and 2 seconds
......@@ -235,10 +235,12 @@ HexVertexIter::HexVertexIter(const CellHandle& _ref_h,
BaseIter(_mesh, _ref_h, _max_laps) {
assert(_ref_h.is_valid());
assert(_mesh->cell(_ref_h).halffaces().size() == 6);
HexahedralMeshTopologyKernel::Cell cell = _mesh->cell(_ref_h);
assert(cell.halffaces().size() == 6);
// Get first half-face
HalfFaceHandle curHF = *_mesh->cell(_ref_h).halffaces().begin();
HalfFaceHandle curHF = *cell.halffaces().begin();
assert(curHF.is_valid());
// Get first half-edge
......
......@@ -32,14 +32,6 @@
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $Date$ *
* $LastChangedBy$ *
* *
\*===========================================================================*/
#include <set>
#include "TetrahedralMeshIterators.hh"
......@@ -58,10 +50,13 @@ TetVertexIter::TetVertexIter(const CellHandle& _ref_h,
BaseIter(_mesh, _ref_h, _max_laps) {
assert(_ref_h.is_valid());
assert(_mesh->cell(_ref_h).halffaces().size() == 4);
TetrahedralMeshTopologyKernel::Cell cell = _mesh->cell(_ref_h);
assert(cell.halffaces().size() == 4);
// Get first half-face
HalfFaceHandle curHF = *_mesh->cell(_ref_h).halffaces().begin();
HalfFaceHandle curHF = *cell.halffaces().begin();
assert(curHF.is_valid());
// Get first half-edge
......
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