mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:10:04 +00:00
Don't stage a value if it's already the current value
This commit is contained in:
parent
289b7620a9
commit
3109344ad5
1 changed files with 9 additions and 2 deletions
|
|
@ -128,8 +128,15 @@ bool SettingsVariable<T>::StageValue(const T& value)
|
||||||
bool validated = false;
|
bool validated = false;
|
||||||
|
|
||||||
if (Validate(value))
|
if (Validate(value))
|
||||||
|
{
|
||||||
|
if (p->value_ != value)
|
||||||
{
|
{
|
||||||
p->staged_ = value;
|
p->staged_ = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p->staged_.reset();
|
||||||
|
}
|
||||||
validated = true;
|
validated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue