diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-02 16:13:08 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-02 16:13:08 +0100 |
commit | 7a8657dfe019104aced61a5b63e63f61ad919f7a (patch) | |
tree | fd8e7aa148aac0a4f50fca8fe05e5016dfd16e47 /src/crepe/util/Private.cpp | |
parent | b8194e02679dc88f5c0a240da83a4700ec5200cf (diff) |
remove `Private`
Diffstat (limited to 'src/crepe/util/Private.cpp')
-rw-r--r-- | src/crepe/util/Private.cpp | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/crepe/util/Private.cpp b/src/crepe/util/Private.cpp deleted file mode 100644 index 262620d..0000000 --- a/src/crepe/util/Private.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "Private.h" - -using namespace crepe; - -bool Private::empty() const noexcept { return this->instance == nullptr; } - -Private::~Private() { - if (this->instance == nullptr) return; - this->destructor(this->instance); -} - -Private::Private(Private && other) { *this = std::move(other); } - -Private & Private::operator=(Private && other) { - // TODO: ideally this function checks for self-assignment - this->instance = other.instance; - this->destructor = other.destructor; - this->type = other.type; - - other.instance = nullptr; - other.destructor = [](void *) {}; - - return *this; -} - -Private::Private(const Private & other) {} -Private & Private::operator=(const Private & other) { return *this; } |