From 43e3830eb49710cff9d9cc1c4a6a9a0605bb9877 Mon Sep 17 00:00:00 2001 From: Aryan Pandey Date: Wed, 20 Sep 2023 15:34:33 +0530 Subject: [PATCH] close #345 fixed Node move constructor (#346) used std::move() in Node move constructor --- include/Node/Node.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/Node/Node.hpp b/include/Node/Node.hpp index e606e1142..24358a161 100755 --- a/include/Node/Node.hpp +++ b/include/Node/Node.hpp @@ -66,7 +66,7 @@ Node::Node(const std::string& id, T&& data) noexcept { this->userId = id; // the userid is set as sha512 hash of the user provided id setId(id); - std::swap(this->data, data); + this->data = std::move(data); } template