mirror of
https://github.com/PancakeTAS/lsfg-vk.git
synced 2026-02-15 18:25:53 +00:00
refactor(cleanup): fix pointer implementation
This commit is contained in:
parent
18b01050eb
commit
3fc830ad0c
1 changed files with 4 additions and 1 deletions
|
|
@ -34,13 +34,16 @@ namespace ls {
|
|||
T* operator->() const { return &this->get(); }
|
||||
|
||||
// moveable
|
||||
owned_ptr(owned_ptr&& other) noexcept : ptr(other.ptr) {
|
||||
owned_ptr(owned_ptr&& other) noexcept :
|
||||
ptr(other.ptr),
|
||||
deleter(std::move(other.deleter)) {
|
||||
other.ptr = nullptr;
|
||||
}
|
||||
owned_ptr& operator=(owned_ptr&& other) noexcept {
|
||||
if (this != &other) {
|
||||
ptr = other.ptr;
|
||||
other.ptr = nullptr;
|
||||
deleter = std::move(other.deleter);
|
||||
}
|
||||
|
||||
return *this;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue