Update settings library version
This commit is contained in:
+1
-1
Submodule lib/settings updated: ad31b38866...94edfacf14
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user