From 249323fc5fa14dbc4c1a6316873cfc07f468f43b Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 1 Mar 2022 09:22:37 +0100 Subject: refactor: fix serial stream & unique ptr --- src/std/memory.tpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/std/memory.tpp') diff --git a/src/std/memory.tpp b/src/std/memory.tpp index 1bfa473..fdfe72b 100644 --- a/src/std/memory.tpp +++ b/src/std/memory.tpp @@ -68,22 +68,19 @@ UniquePtr &UniquePtr::operator=(UniquePtr &&unique_ptr) noexcept template UniquePtr::~UniquePtr() { - if (this->_target != nullptr) - { - delete this->_target; - } + delete _target; } template Target UniquePtr::operator*() const { - return *(this->_target); + return *(_target); } template Target *UniquePtr::operator->() const { - return this->_target; + return _target; } template -- cgit v1.2.3-18-g5258