Add std::move to all members

This commit is contained in:
Raphael Grimm 2020-12-18 10:54:42 +01:00
parent 7bd2923bc3
commit c395a5d3f7
1 changed files with 8 additions and 8 deletions

View File

@ -187,14 +187,14 @@ public:
* @param other The instance to be moved * @param other The instance to be moved
*/ */
Side_of_triangle_mesh(Side_of_triangle_mesh&& other) : Side_of_triangle_mesh(Side_of_triangle_mesh&& other) :
tm_ptr{other.tm_ptr}, tm_ptr{std::move(other.tm_ptr)},
opt_vpm{std::move(other.opt_vpm)}, opt_vpm{std::move(other.opt_vpm)},
own_tree{other.own_tree}, own_tree{std::move(other.own_tree)},
box{other.box}, box{std::move(other.box)},
#ifdef CGAL_HAS_THREADS #ifdef CGAL_HAS_THREADS
atomic_tree_ptr{other.atomic_tree_ptr.load()} atomic_tree_ptr{other.atomic_tree_ptr.load()}
#else #else
tree_ptr{other.tree_ptr} tree_ptr{std::move(other.tree_ptr)}
#endif #endif
{ {
other.own_tree = false; other.own_tree = false;
@ -219,15 +219,15 @@ public:
*/ */
Side_of_triangle_mesh& operator=(Side_of_triangle_mesh&& other) Side_of_triangle_mesh& operator=(Side_of_triangle_mesh&& other)
{ {
tm_ptr = other.tm_ptr; tm_ptr = std::move(other.tm_ptr);
opt_vpm = std::move(other.opt_vpm); opt_vpm = std::move(other.opt_vpm);
own_tree = other.own_tree; own_tree = std::move(other.own_tree);
box = other.box; box = std::move(other.box);
other.own_tree = false; other.own_tree = false;
#ifdef CGAL_HAS_THREADS #ifdef CGAL_HAS_THREADS
atomic_tree_ptr = atomic_tree_ptr.load(); atomic_tree_ptr = atomic_tree_ptr.load();
#else #else
tree_ptr = other.tree_ptr; tree_ptr = std::move(other.tree_ptr);
#endif #endif
return *this; return *this;
} }