summaryrefslogtreecommitdiff
path: root/Editor/UndoStack.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Editor/UndoStack.cpp')
-rw-r--r--Editor/UndoStack.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/Editor/UndoStack.cpp b/Editor/UndoStack.cpp
new file mode 100644
index 0000000000..45867d2c79
--- /dev/null
+++ b/Editor/UndoStack.cpp
@@ -0,0 +1,14 @@
+#include "cuki.h"
+#include "UndoStack.h"
+
+void UndoStack::push(OwnPtr<Operation>&& op)
+{
+ m_stack.push(std::move(op));
+}
+
+OwnPtr<Operation> UndoStack::pop()
+{
+ OwnPtr<Operation> op = std::move(m_stack.top());
+ m_stack.pop();
+ return op;
+}