mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 13:20: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
|
|
@ -129,8 +129,15 @@ bool SettingsVariable<T>::StageValue(const T& value)
|
||||||
|
|
||||||
if (Validate(value))
|
if (Validate(value))
|
||||||
{
|
{
|
||||||
p->staged_ = value;
|
if (p->value_ != value)
|
||||||
validated = true;
|
{
|
||||||
|
p->staged_ = value;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p->staged_.reset();
|
||||||
|
}
|
||||||
|
validated = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return validated;
|
return validated;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue