From 5aa818e65eaa3cc288e097ed3b1a134015215500 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 14 Mar 2022 10:40:26 +0100 Subject: refactor: move UniquePtr to memory dir in common --- src/common/memory.hpp | 31 ------------------------------- 1 file changed, 31 deletions(-) (limited to 'src/common/memory.hpp') diff --git a/src/common/memory.hpp b/src/common/memory.hpp index de72d80..888ede3 100644 --- a/src/common/memory.hpp +++ b/src/common/memory.hpp @@ -8,37 +8,6 @@ namespace common template memType *malloc_s(unsigned int size); -template -class UniquePtr -{ -public: - explicit UniquePtr() = default; - explicit UniquePtr(Target *target); - - // Move constructor - UniquePtr(UniquePtr &&unique_ptr) noexcept; - - // Move assignment operator - UniquePtr &operator=(UniquePtr &&unique_ptr) noexcept; - - // Disable the copy constructor - UniquePtr(const UniquePtr &unique_ptr) = delete; - - // Disable the copy assignment operator - UniquePtr &operator=(const UniquePtr &unique_ptr) = delete; - - ~UniquePtr(); - - Target operator*() const; - Target *operator->() const; - -private: - Target *_target = nullptr; -}; - -template -UniquePtr make_unique(Args... args); - } // namespace common #include "memory.tpp" -- cgit v1.2.3-18-g5258