diff options
author | David Robillard <d@drobilla.net> | 2020-08-02 13:43:01 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-08-02 13:43:49 +0200 |
commit | 019eeff6a7d051427ad62a288f350e66471a0462 (patch) | |
tree | e43854a6241ba52f244ce75aa8d500849968d4d4 /include/ingen | |
parent | 7eae940654c8c81c1efc8a055a13c53fab42bf91 (diff) | |
download | ingen-019eeff6a7d051427ad62a288f350e66471a0462.tar.gz ingen-019eeff6a7d051427ad62a288f350e66471a0462.tar.bz2 ingen-019eeff6a7d051427ad62a288f350e66471a0462.zip |
Remove std::unique_ptr alias
Diffstat (limited to 'include/ingen')
-rw-r--r-- | include/ingen/AtomForge.hpp | 5 | ||||
-rw-r--r-- | include/ingen/Serialiser.hpp | 3 | ||||
-rw-r--r-- | include/ingen/memory.hpp | 3 |
3 files changed, 5 insertions, 6 deletions
diff --git a/include/ingen/AtomForge.hpp b/include/ingen/AtomForge.hpp index ac8d15aa..372fd29d 100644 --- a/include/ingen/AtomForge.hpp +++ b/include/ingen/AtomForge.hpp @@ -28,6 +28,7 @@ #include <cstdint> #include <cstdlib> #include <cstring> +#include <memory> namespace ingen { @@ -69,8 +70,8 @@ public: private: struct SratomDeleter { void operator()(Sratom* s) { sratom_free(s); } }; - using AtomPtr = UPtr<LV2_Atom, FreeDeleter<LV2_Atom>>; - using SratomPtr = UPtr<Sratom, SratomDeleter>; + using AtomPtr = std::unique_ptr<LV2_Atom, FreeDeleter<LV2_Atom>>; + using SratomPtr = std::unique_ptr<Sratom, SratomDeleter>; /// Append some data and return a reference to its start intptr_t append(const void* data, uint32_t len) { diff --git a/include/ingen/Serialiser.hpp b/include/ingen/Serialiser.hpp index 7311d6ce..103a4822 100644 --- a/include/ingen/Serialiser.hpp +++ b/include/ingen/Serialiser.hpp @@ -23,6 +23,7 @@ #include "ingen/memory.hpp" #include "sord/sordmm.hpp" +#include <memory> #include <string> namespace Raul { class Path; } @@ -98,7 +99,7 @@ public: private: struct Impl; - UPtr<Impl> me; + std::unique_ptr<Impl> me; }; } // namespace ingen diff --git a/include/ingen/memory.hpp b/include/ingen/memory.hpp index 82a1e2a6..bec86c43 100644 --- a/include/ingen/memory.hpp +++ b/include/ingen/memory.hpp @@ -30,9 +30,6 @@ void NullDeleter(T* ptr) {} template <class T> struct FreeDeleter { void operator()(T* const ptr) { free(ptr); } }; -template <class T, class Deleter = std::default_delete<T>> -using UPtr = std::unique_ptr<T, Deleter>; - template <class T> using SPtr = std::shared_ptr<T>; |