Commit 5a91d22c authored by Martin Heistermann's avatar Martin Heistermann

Add asserts to detect double-deletion of entities.

parent aec6d218
......@@ -591,6 +591,8 @@ void TopologyKernel::set_cell(const CellHandle& _ch, const std::vector<HalfFaceH
*/
VertexIter TopologyKernel::delete_vertex(const VertexHandle& _h) {
assert(!is_deleted(_h));
std::vector<VertexHandle> vs;
vs.push_back(_h);
......@@ -641,6 +643,8 @@ VertexIter TopologyKernel::delete_vertex(const VertexHandle& _h) {
*/
EdgeIter TopologyKernel::delete_edge(const EdgeHandle& _h) {
assert(!is_deleted(_h));
std::vector<EdgeHandle> es;
es.push_back(_h);
......@@ -682,6 +686,8 @@ EdgeIter TopologyKernel::delete_edge(const EdgeHandle& _h) {
*/
FaceIter TopologyKernel::delete_face(const FaceHandle& _h) {
assert(!is_deleted(_h));
std::vector<FaceHandle> fs;
fs.push_back(_h);
......@@ -711,6 +717,7 @@ FaceIter TopologyKernel::delete_face(const FaceHandle& _h) {
*/
CellIter TopologyKernel::delete_cell(const CellHandle& _h) {
assert(!is_deleted(_h));
return delete_cell_core(_h);
}
......
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