From 251074ad5438f69b345c576ab4e5d43e5d519abe Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 22 Jul 2020 12:29:39 +0200 Subject: [PATCH 1/2] Use an API compatible with boost::optional and std::optional --- Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index 664343620bf..e98d57086b0 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -1224,8 +1224,8 @@ private: if(update_c3t3) { // Update status in c3t3 - if(surface != boost::none) - c3t3_.add_to_complex(facet, surface.get()); + if((bool)surface) + c3t3_.add_to_complex(facet, *surface); else c3t3_.remove_from_complex(facet); } @@ -2054,7 +2054,7 @@ private: true); /* update surface centers */ // false means "do not update the c3t3" if ( c3t3_.is_in_complex(*fit) != (bool)sp || - ((bool)sp && !(c3t3_.surface_patch_index(*fit) == sp.get()) ) ) + ((bool)sp && !(c3t3_.surface_patch_index(*fit) == *sp) ) ) return false; } From 25eeff801bd102fcbc5050d3556bad4b661e2582 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 22 Jul 2020 12:29:55 +0200 Subject: [PATCH 2/2] Fix a warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` .../CGAL/Mesh_3/C3T3_helpers.h:1249:14: warning: ‘*((void*)& surface +4)’ may be used uninitialized in this function [-Wmaybe-uninitialized] 1249 | return surface; | ^~~~~~~ ``` --- Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h index e98d57086b0..2c162e7cc61 100644 --- a/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h +++ b/Mesh_3/include/CGAL/Mesh_3/C3T3_helpers.h @@ -1246,7 +1246,7 @@ private: } } - return surface; + return surface ? surface : Surface_patch(); }