From 61f11389ea6296fb0c28dd7aa4d0bfa6feb919f3 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 28 Feb 2022 14:21:48 +0100 Subject: refactor: move unique ptr default ctor to header --- src/std/memory.hpp | 2 +- src/std/memory.tpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'src/std') diff --git a/src/std/memory.hpp b/src/std/memory.hpp index e870b0b..0c5719c 100644 --- a/src/std/memory.hpp +++ b/src/std/memory.hpp @@ -9,7 +9,7 @@ template class UniquePtr { public: - explicit UniquePtr(); + explicit UniquePtr() = default; explicit UniquePtr(Target *target); UniquePtr(const UniquePtr &unique_ptr); UniquePtr(UniquePtr &&unique_ptr) noexcept; diff --git a/src/std/memory.tpp b/src/std/memory.tpp index fbfcd32..1bfa473 100644 --- a/src/std/memory.tpp +++ b/src/std/memory.tpp @@ -1,5 +1,7 @@ #pragma once +#include "memory.hpp" + #include "utils.hpp" #include @@ -19,9 +21,6 @@ memType *malloc_s(unsigned int size) return static_cast(mem); } -template -UniquePtr::UniquePtr() = default; - template UniquePtr::UniquePtr(Target *target) : _target(target) { -- cgit v1.2.3-18-g5258