From fb094f7aaa19c45dac0c7559b5ad7777d099d40c Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Mon, 17 Jun 2019 08:42:33 +0200 Subject: [PATCH] Cont Polygonal_schema --- .../include/CGAL/Polygonal_schema.h | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/Surface_mesh_topology/include/CGAL/Polygonal_schema.h b/Surface_mesh_topology/include/CGAL/Polygonal_schema.h index c0e257e30c6..3180b9f66d5 100644 --- a/Surface_mesh_topology/include/CGAL/Polygonal_schema.h +++ b/Surface_mesh_topology/include/CGAL/Polygonal_schema.h @@ -117,17 +117,7 @@ namespace CGAL { if (prev_dart!=gmap.null_handle) { gmap.template link_alpha<1>(res, gmap.template alpha<0>(prev_dart)); } - if ((dart_same_label==NULL && dart_opposite_label==NULL) || - dart_opposite_label!=NULL) - { - edge_label_to_dart[s]=res; - gmap.info(res).m_label=new char[s.size()+1]; - strncpy(gmap.info(res).m_label, s.c_str(), s.size()+1); // +1 to copy also the \0 char - - if (dart_opposite_label!=NULL) - { gmap.template sew<2>(dh2, dart_opposite_label); } - } - else + if (dart_same_label!=NULL) { // Here dart_same_label!=NULL std::string s2=opposite_label(s); edge_label_to_dart[s2]=dh2; @@ -136,6 +126,15 @@ namespace CGAL { gmap.template sew<2>(res, dart_same_label); } + else + { // Here either dart_opposite_label!=NULL, or both are NULL + edge_label_to_dart[s]=res; + gmap.info(res).m_label=new char[s.size()+1]; + strncpy(gmap.info(res).m_label, s.c_str(), s.size()+1); // +1 to copy also the \0 char + + if (dart_opposite_label!=NULL) + { gmap.template sew<2>(dh2, dart_opposite_label); } + } return res; }