mirror of https://github.com/CGAL/cgal
move() -> forward<>()
This commit is contained in:
parent
267ab23599
commit
fcff28f0aa
|
|
@ -65,7 +65,7 @@ public:
|
||||||
{}
|
{}
|
||||||
|
|
||||||
explicit General_polygon_with_holes_2(Polygon_2&& pgn_boundary) :
|
explicit General_polygon_with_holes_2(Polygon_2&& pgn_boundary) :
|
||||||
m_pgn(std::move(pgn_boundary))
|
m_pgn(std::forward<Polygon_2>(pgn_boundary))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
template <typename HolesInputIterator>
|
template <typename HolesInputIterator>
|
||||||
|
|
@ -80,7 +80,7 @@ public:
|
||||||
General_polygon_with_holes_2(Polygon_2&& pgn_boundary,
|
General_polygon_with_holes_2(Polygon_2&& pgn_boundary,
|
||||||
HolesInputIterator h_begin,
|
HolesInputIterator h_begin,
|
||||||
HolesInputIterator h_end) :
|
HolesInputIterator h_end) :
|
||||||
m_pgn(std::move(pgn_boundary)),
|
m_pgn(std::forward<Polygon_2>(pgn_boundary)),
|
||||||
m_holes(h_begin, h_end)
|
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(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<Polygon_2>(pgn_hole)); }
|
||||||
|
|
||||||
void erase_hole(Hole_iterator hit) { m_holes.erase(hit); }
|
void erase_hole(Hole_iterator hit) { m_holes.erase(hit); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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(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<Polygon_with_holes_2>(pgn)); }
|
||||||
|
|
||||||
void push_back(const Polygon_with_holes_2& pgn) { m_polygons.push_back(pgn); }
|
void push_back(const Polygon_with_holes_2& pgn) { m_polygons.push_back(pgn); }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ public:
|
||||||
|
|
||||||
/*! Move constructor */
|
/*! Move constructor */
|
||||||
explicit Polygon_with_holes_2 (Polygon_2&& pgn_boundary) :
|
explicit Polygon_with_holes_2 (Polygon_2&& pgn_boundary) :
|
||||||
Base (std::move(pgn_boundary))
|
Base (std::forward<Polygon_2>(pgn_boundary))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor from a polygon (outer boundary) and hole polygons. */
|
/*! Constructor from a polygon (outer boundary) and hole polygons. */
|
||||||
|
|
@ -84,7 +84,7 @@ public:
|
||||||
Polygon_with_holes_2 (Polygon_2&& pgn_boundary,
|
Polygon_with_holes_2 (Polygon_2&& pgn_boundary,
|
||||||
HolesInputIterator h_begin,
|
HolesInputIterator h_begin,
|
||||||
HolesInputIterator h_end) :
|
HolesInputIterator h_end) :
|
||||||
Base (std::move(pgn_boundary), h_begin, h_end)
|
Base (std::forward<Polygon_2>(pgn_boundary), h_begin, h_end)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Obtain the bounding box of the polygon with holes */
|
/*! Obtain the bounding box of the polygon with holes */
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue