Skip to content

Commit

Permalink
style: use member initializer in the move constructor of Any
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 committed Feb 2, 2024
1 parent 42cab9a commit 8506cd3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/any.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 8506cd3

Please sign in to comment.