mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-06 13:35:03 +00:00
Import a simple text editor I started working on.
This commit is contained in:
14
Editor/UndoStack.cpp
Normal file
14
Editor/UndoStack.cpp
Normal file
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user