From 8506cd3bd0c3c3de890978753aa9d25e08b85f81 Mon Sep 17 00:00:00 2001 From: vil02 Date: Fri, 2 Feb 2024 20:27:05 +0100 Subject: [PATCH] style: use member initializer in the move constructor of `Any` --- api/any.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/any.hpp b/api/any.hpp index 9f5525cfb..2a25c9598 100644 --- a/api/any.hpp +++ b/api/any.hpp @@ -105,11 +105,8 @@ namespace jule this->__get_copy(src); } - Any(const jule::Any &&src) noexcept + Any(const jule::Any &&src) noexcept : data(src.data), type(src.type) { - this->data = src.data; - this->type = src.type; - // Avoid deallocation. src.data = nullptr; }