Skip to content

Commit

Permalink
style: use member initializer in the move constructor of Ptr
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 committed Feb 2, 2024
1 parent 4d58320 commit f6f50bd
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions api/ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,8 @@ namespace jule
this->__get_copy(src);
}

Ptr(jule::Ptr<T> &&src) noexcept
Ptr(jule::Ptr<T> &&src) noexcept : alloc(src.alloc), ref(src.ref)
{
this->alloc = src.alloc;
this->ref = src.ref;

// Avoid deallocation.
src.ref = nullptr;
}
Expand Down

0 comments on commit f6f50bd

Please sign in to comment.