diff options
author | HampusM <hampus@hampusmat.com> | 2022-02-28 14:21:48 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2022-02-28 14:21:48 +0100 |
commit | 61f11389ea6296fb0c28dd7aa4d0bfa6feb919f3 (patch) | |
tree | a1c979750d88c1cfc19d5411e15726d4c5757e4c /src/std | |
parent | df251075e5f3b5b54dd1bd272e348d20953fbfc7 (diff) |
refactor: move unique ptr default ctor to header
Diffstat (limited to 'src/std')
-rw-r--r-- | src/std/memory.hpp | 2 | ||||
-rw-r--r-- | src/std/memory.tpp | 5 |
2 files changed, 3 insertions, 4 deletions
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 Target> 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 <Arduino.h> @@ -20,9 +22,6 @@ memType *malloc_s(unsigned int size) } template <class Target> -UniquePtr<Target>::UniquePtr() = default; - -template <class Target> UniquePtr<Target>::UniquePtr(Target *target) : _target(target) { } |