Avoid double lookups

This commit is contained in:
Chocobo1 2019-09-08 14:00:08 +08:00
parent d2c21ce507
commit daf52a2610
No known key found for this signature in database
GPG key ID: 210D9C873253A68C
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;