From fcff28f0aa0c6567f145b6fdfb8cf8542bb75eb1 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 16 Apr 2024 08:22:23 +0100 Subject: [PATCH] move() -> forward<>() --- Polygon/include/CGAL/General_polygon_with_holes_2.h | 6 +++--- Polygon/include/CGAL/Multipolygon_with_holes_2.h | 2 +- Polygon/include/CGAL/Polygon_with_holes_2.h | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Polygon/include/CGAL/General_polygon_with_holes_2.h b/Polygon/include/CGAL/General_polygon_with_holes_2.h index bb19fcf9943..3034e112834 100644 --- a/Polygon/include/CGAL/General_polygon_with_holes_2.h +++ b/Polygon/include/CGAL/General_polygon_with_holes_2.h @@ -65,7 +65,7 @@ public: {} explicit General_polygon_with_holes_2(Polygon_2&& pgn_boundary) : - m_pgn(std::move(pgn_boundary)) + m_pgn(std::forward(pgn_boundary)) {} template @@ -80,7 +80,7 @@ public: General_polygon_with_holes_2(Polygon_2&& pgn_boundary, HolesInputIterator h_begin, HolesInputIterator h_end) : - m_pgn(std::move(pgn_boundary)), + m_pgn(std::forward(pgn_boundary)), m_holes(h_begin, h_end) {} @@ -104,7 +104,7 @@ public: void add_hole(const Polygon_2& pgn_hole) { m_holes.push_back(pgn_hole); } - void add_hole(Polygon_2&& pgn_hole) { m_holes.emplace_back(std::move(pgn_hole)); } + void add_hole(Polygon_2&& pgn_hole) { m_holes.emplace_back(std::forward(pgn_hole)); } void erase_hole(Hole_iterator hit) { m_holes.erase(hit); } diff --git a/Polygon/include/CGAL/Multipolygon_with_holes_2.h b/Polygon/include/CGAL/Multipolygon_with_holes_2.h index 2449b9dd8ee..36cad53ecb3 100644 --- a/Polygon/include/CGAL/Multipolygon_with_holes_2.h +++ b/Polygon/include/CGAL/Multipolygon_with_holes_2.h @@ -91,7 +91,7 @@ public: void add_polygon_with_holes(const Polygon_with_holes_2& pgn) { m_polygons.push_back(pgn); } - void add_polygon_with_holes(Polygon_with_holes_2&& pgn) { m_polygons.emplace_back(std::move(pgn)); } + void add_polygon_with_holes(Polygon_with_holes_2&& pgn) { m_polygons.emplace_back(std::forward(pgn)); } void push_back(const Polygon_with_holes_2& pgn) { m_polygons.push_back(pgn); } diff --git a/Polygon/include/CGAL/Polygon_with_holes_2.h b/Polygon/include/CGAL/Polygon_with_holes_2.h index 23eb826e9b2..8f85085ed90 100644 --- a/Polygon/include/CGAL/Polygon_with_holes_2.h +++ b/Polygon/include/CGAL/Polygon_with_holes_2.h @@ -65,7 +65,7 @@ public: /*! Move constructor */ explicit Polygon_with_holes_2 (Polygon_2&& pgn_boundary) : - Base (std::move(pgn_boundary)) + Base (std::forward(pgn_boundary)) {} /*! Constructor from a polygon (outer boundary) and hole polygons. */ @@ -84,7 +84,7 @@ public: Polygon_with_holes_2 (Polygon_2&& pgn_boundary, HolesInputIterator h_begin, HolesInputIterator h_end) : - Base (std::move(pgn_boundary), h_begin, h_end) + Base (std::forward(pgn_boundary), h_begin, h_end) {} /*! Obtain the bounding box of the polygon with holes */