From e27268a075cb297e599bb8f3d087d4cf773fbbf6 Mon Sep 17 00:00:00 2001 From: vil02 Date: Fri, 2 Feb 2024 20:49:31 +0100 Subject: [PATCH] fix: do not use `const` in move constructors --- api/any.hpp | 2 +- api/ptr.hpp | 2 +- api/slice.hpp | 2 +- api/trait.hpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/api/any.hpp b/api/any.hpp index 2a25c9598..32a13adfc 100644 --- a/api/any.hpp +++ b/api/any.hpp @@ -105,7 +105,7 @@ namespace jule this->__get_copy(src); } - Any(const jule::Any &&src) noexcept : data(src.data), type(src.type) + Any(jule::Any &&src) noexcept : data(src.data), type(src.type) { // Avoid deallocation. src.data = nullptr; diff --git a/api/ptr.hpp b/api/ptr.hpp index 6c1a9a218..511552011 100644 --- a/api/ptr.hpp +++ b/api/ptr.hpp @@ -108,7 +108,7 @@ namespace jule this->__get_copy(src); } - Ptr(const jule::Ptr &&src) noexcept + Ptr(jule::Ptr &&src) noexcept { this->alloc = src.alloc; this->ref = src.ref; diff --git a/api/slice.hpp b/api/slice.hpp index 50a918095..f15b0e4df 100644 --- a/api/slice.hpp +++ b/api/slice.hpp @@ -87,7 +87,7 @@ namespace jule this->__get_copy(src); } - Slice(const jule::Slice &&src) noexcept + Slice(jule::Slice &&src) noexcept { this->__get_copy(src); } diff --git a/api/trait.hpp b/api/trait.hpp index 02dcc70a4..8e1549d28 100644 --- a/api/trait.hpp +++ b/api/trait.hpp @@ -66,7 +66,7 @@ namespace jule this->__get_copy(src); } - Trait(const jule::Trait &&src) noexcept + Trait(jule::Trait &&src) noexcept { this->__get_copy(src); }