From 071827727159c842e0b3ff305ee6fef80b4eddb5 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Sun, 22 Apr 2018 14:09:38 +0200 Subject: [PATCH] Update settings library version --- lib/settings | 2 +- src/singletons/helper/chatterinosetting.hpp | 37 +++------------------ 2 files changed, 5 insertions(+), 34 deletions(-) diff --git a/lib/settings b/lib/settings index ad31b3886..94edfacf1 160000 --- a/lib/settings +++ b/lib/settings @@ -1 +1 @@ -Subproject commit ad31b38866d80a17ced902476ed06da69edce3a0 +Subproject commit 94edfacf14728faf3aa1d9c058e89395c97aae14 diff --git a/src/singletons/helper/chatterinosetting.hpp b/src/singletons/helper/chatterinosetting.hpp index 9024dd2e7..824cb1633 100644 --- a/src/singletons/helper/chatterinosetting.hpp +++ b/src/singletons/helper/chatterinosetting.hpp @@ -21,20 +21,9 @@ public: _registerSetting(this->data); } - ChatterinoSetting &operator=(const Type &newValue) - { - assert(this->data != nullptr); - - this->setValue(newValue); - - return *this; - } - template ChatterinoSetting &operator=(const T2 &newValue) { - assert(this->data != nullptr); - this->setValue(newValue); return *this; @@ -42,33 +31,15 @@ public: ChatterinoSetting &operator=(Type &&newValue) noexcept { - assert(this->data != nullptr); - - this->setValue(std::move(newValue)); + pajlada::Settings::Setting::operator=(newValue); return *this; } - bool operator==(const Type &rhs) const - { - assert(this->data != nullptr); + using pajlada::Settings::Setting::operator==; + using pajlada::Settings::Setting::operator!=; - return this->getValue() == rhs; - } - - bool operator!=(const Type &rhs) const - { - assert(this->data != nullptr); - - return this->getValue() != rhs; - } - - operator const Type() const - { - assert(this->data != nullptr); - - return this->getValue(); - } + using pajlada::Settings::Setting::operator const Type; }; } // namespace singletons