Skip to content

Commit

Permalink
close #345 fixed Node<T> move constructor (#346)
Browse files Browse the repository at this point in the history
used std::move() in Node<T> move constructor
  • Loading branch information
AryanGitHub authored Sep 20, 2023
1 parent 9889cb2 commit 43e3830
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/Node/Node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Node<T>::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 <typename T>
Expand Down

0 comments on commit 43e3830

Please sign in to comment.