Avoid double lookups

This commit is contained in:
Chocobo1
2019-09-08 14:00:08 +08:00
parent d2c21ce507
commit daf52a2610
2 changed files with 11 additions and 7 deletions

View File

@@ -68,6 +68,9 @@ public:
CachedSettingValue<T> &operator=(const T &newValue)
{
if (m_value == newValue)
return *this;
m_value = newValue;
storeValue(m_value);
return *this;