Skip to content

Commit

Permalink
Merge pull request #77 from vil02/use_member_initializer_in_any
Browse files Browse the repository at this point in the history
style: use member initializer in the move constructor of `Any`
  • Loading branch information
mertcandav authored Feb 2, 2024
2 parents 42cab9a + 8506cd3 commit 0019c5a
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 0019c5a

Please sign in to comment.