Update settings library version

This commit is contained in:
Rasmus Karlsson 2018-04-22 14:09:38 +02:00
parent 633c9fa68b
commit 0718277271
2 changed files with 5 additions and 34 deletions

@ -1 +1 @@
Subproject commit ad31b38866d80a17ced902476ed06da69edce3a0 Subproject commit 94edfacf14728faf3aa1d9c058e89395c97aae14

View file

@ -21,20 +21,9 @@ public:
_registerSetting(this->data); _registerSetting(this->data);
} }
ChatterinoSetting &operator=(const Type &newValue)
{
assert(this->data != nullptr);
this->setValue(newValue);
return *this;
}
template <typename T2> template <typename T2>
ChatterinoSetting &operator=(const T2 &newValue) ChatterinoSetting &operator=(const T2 &newValue)
{ {
assert(this->data != nullptr);
this->setValue(newValue); this->setValue(newValue);
return *this; return *this;
@ -42,33 +31,15 @@ public:
ChatterinoSetting &operator=(Type &&newValue) noexcept ChatterinoSetting &operator=(Type &&newValue) noexcept
{ {
assert(this->data != nullptr); pajlada::Settings::Setting<Type>::operator=(newValue);
this->setValue(std::move(newValue));
return *this; return *this;
} }
bool operator==(const Type &rhs) const using pajlada::Settings::Setting<Type>::operator==;
{ using pajlada::Settings::Setting<Type>::operator!=;
assert(this->data != nullptr);
return this->getValue() == rhs; using pajlada::Settings::Setting<Type>::operator const Type;
}
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();
}
}; };
} // namespace singletons } // namespace singletons