aboutsummaryrefslogtreecommitdiffhomepage
path: root/undo.h
diff options
context:
space:
mode:
Diffstat (limited to 'undo.h')
-rw-r--r--undo.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/undo.h b/undo.h
index 29ec70f..9c7ac5f 100644
--- a/undo.h
+++ b/undo.h
@@ -58,15 +58,20 @@ public:
}
~UndoStack();
+ inline void
+ push(UndoToken *token)
+ {
+ SLIST_INSERT_HEAD(&head, token, tokens);
+ }
+
void push_msg(unsigned int iMessage,
uptr_t wParam = 0, sptr_t lParam = 0);
template <typename Type>
- void
+ inline void
push_var(Type &variable, Type value)
{
- UndoToken *token = new UndoTokenVariable<Type>(variable, value);
- SLIST_INSERT_HEAD(&head, token, tokens);
+ push(new UndoTokenVariable<Type>(variable, value));
}
template <typename Type>