diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-30 16:42:21 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-30 16:42:21 +0100 |
commit | 9eff2e24fa4cf0ffad2b47cc922a6558bc1a9fa1 (patch) | |
tree | e673cba5f221523d37f51b67a155abfc0c415eb3 /src/crepe/util/Private.cpp | |
parent | f7d70abf3fee5933034d93f594f898849c5273ad (diff) |
`make format`
Diffstat (limited to 'src/crepe/util/Private.cpp')
-rw-r--r-- | src/crepe/util/Private.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/crepe/util/Private.cpp b/src/crepe/util/Private.cpp index cb4cb5b..262620d 100644 --- a/src/crepe/util/Private.cpp +++ b/src/crepe/util/Private.cpp @@ -2,18 +2,14 @@ using namespace crepe; -bool Private::empty() const noexcept { - return this->instance == nullptr; -} +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(Private && other) { *this = std::move(other); } Private & Private::operator=(Private && other) { // TODO: ideally this function checks for self-assignment @@ -22,13 +18,10 @@ Private & Private::operator=(Private && other) { this->type = other.type; other.instance = nullptr; - other.destructor = [](void*){}; - - return *this; -} + other.destructor = [](void *) {}; -Private::Private(const Private & other) { } -Private & Private::operator=(const Private & other) { return *this; } +Private::Private(const Private & other) {} +Private & Private::operator=(const Private & other) { return *this; } |