mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:37:34 +00:00
AK: Add ScopedValueRollback::set_override_rollback_value().
This can be used if you change your mind about what value we should roll back to. :^)
This commit is contained in:
parent
65c3101897
commit
6ae95945aa
1 changed files with 5 additions and 0 deletions
|
@ -16,6 +16,11 @@ public:
|
||||||
m_variable = m_saved_value;
|
m_variable = m_saved_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_override_rollback_value(const T& value)
|
||||||
|
{
|
||||||
|
m_saved_value = value;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T& m_variable;
|
T& m_variable;
|
||||||
T m_saved_value;
|
T m_saved_value;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue