From 50c9740cffaa5ca012e98c93696b544916b27a3d Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 27 Mar 2024 23:18:33 +0100 Subject: [PATCH] fix the use of rvalue references --- Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h | 2 +- Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h index a45cee3fe71..939e80c0c2a 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Vector_2.h @@ -53,7 +53,7 @@ public: : base(CGAL::make_array(x, y)) {} VectorC2(FT&& x, FT&& y) - : base(CGAL::fwd_make_array(x, y)) {} + : base(CGAL::fwd_make_array(std::move(x), std::move(y))) {} VectorC2(const FT &hx, const FT &hy, const FT &hw) : base( hw != FT(1) ? CGAL::make_array(hx/hw, hy/hw) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h index ff9ef65bb7d..f6563db5b7a 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Vector_3.h @@ -68,7 +68,7 @@ public: : base(CGAL::make_array(x, y, z)) {} VectorC3(FT_&& x, FT_&& y, FT_&& z) - : base(CGAL::fwd_make_array(x, y, z)) {} + : base(CGAL::make_array(std::move(x), std::move(y), std::move(z))) {} VectorC3(const FT_ &x, const FT_ &y, const FT_ &z, const FT_ &w) : base( w != FT_(1) ? CGAL::make_array(x/w, y/w, z/w)