In debug mode write a warning message in garbage collection, if the status flags are missing for one of the primitives.

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@659 fdac6126-5c0c-442c-9429-916003d36597
This commit is contained in:
Jan Möbius
2012-09-07 16:24:50 +00:00
parent 727157bab2
commit 82ef0a086a

View File

@@ -44,7 +44,6 @@
//== INCLUDES =================================================================
#include <OpenMesh/Core/Mesh/ArrayKernel.hh>
//#include <vector>
//== NAMESPACES ===============================================================
@@ -62,6 +61,17 @@ void ArrayKernel::garbage_collection(std_API_Container_VHandlePointer& vh_to_upd
bool _v, bool _e, bool _f)
{
#ifdef DEBUG
#ifndef OM_GARBAGE_NO_STATUS_WARNING
if ( !this->has_vertex_status() )
omerr() << "garbage_collection: No vertex status available. You can request it: mesh.request_vertex_status() or define OM_GARBAGE_NO_STATUS_WARNING to silence this warning." << std::endl;
if ( !this->has_edge_status() )
omerr() << "garbage_collection: No edge status available. You can request it: mesh.request_edge_status() or define OM_GARBAGE_NO_STATUS_WARNING to silence this warning." << std::endl;
if ( !this->has_face_status() )
omerr() << "garbage_collection: No face status available. You can request it: mesh.request_face_status() or define OM_GARBAGE_NO_STATUS_WARNING to silence this warning." << std::endl;
#endif
#endif
int i, i0, i1, nV(n_vertices()), nE(n_edges()), nH(2*n_edges()), nF(n_faces());
std::vector<VertexHandle> vh_map;