From f7218dadd692e9f20af27aef063f32cd50d1e578 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 31 Jan 2020 14:19:49 +0100 Subject: [PATCH] Do not use swap for the move-assignment of TDS_3 We can write the operator easily without swap. --- TDS_3/include/CGAL/Triangulation_data_structure_3.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TDS_3/include/CGAL/Triangulation_data_structure_3.h b/TDS_3/include/CGAL/Triangulation_data_structure_3.h index f0c35a7a1e3..82744371605 100644 --- a/TDS_3/include/CGAL/Triangulation_data_structure_3.h +++ b/TDS_3/include/CGAL/Triangulation_data_structure_3.h @@ -251,8 +251,9 @@ public: Tds & operator= (Tds && tds) noexcept(noexcept(Tds(std::move(tds)))) { - Tds tmp(std::move(tds)); - swap(tmp); + _cells = std::move(tds._cells); + _vertices = std::move(tds._vertices); + _dimension = std::exchange(tds._dimension, -2); return *this; }