Hid std::cerr behind debug macros

This commit is contained in:
Mael Rouxel-Labbé 2017-06-20 14:40:52 +02:00
parent 3307561dd7
commit 3becb6aa7b
1 changed files with 6 additions and 0 deletions

View File

@ -973,13 +973,17 @@ public:
{
std::pair<TM_edge_descriptor, bool> tmed = CGAL::edge(tm_vd_s, tm_vd_t, tm);
if(!tmed.second) {
#ifdef SEAM_MESH_DEBUG
std::cerr << "Warning: Ignored a constraint because it is not a valid edge of the mesh" << std::endl;
#endif
return false;
}
if(!is_border(tmed.first, tm)) { // ignore seams that are also a border edge
if(get(sem, tmed.first) == true) {
#ifdef SEAM_MESH_DEBUG
std::cerr << "Warning: Ignored a constraint because it is already marked as a seam" << std::endl;
#endif
return false;
}
@ -988,7 +992,9 @@ public:
put(svm, tm_vd_t, true);
++number_of_seams;
} else {
#ifdef SEAM_MESH_DEBUG
std::cerr << "Warning: Ignored a constraint because it is on the border of the mesh" << std::endl;
#endif
return false;
}