[studio] Move UndoCommand implementation to its own file

This commit is contained in:
Gary Talent 2024-05-02 22:50:25 -05:00
parent 97bc9332d3
commit 0a0a6e306d
3 changed files with 11 additions and 4 deletions

View File

@ -7,6 +7,7 @@ add_library(
popup.cpp
project.cpp
task.cpp
undocommand.cpp
undostack.cpp
filedialog_nfd.cpp
)

View File

@ -0,0 +1,10 @@
#include <studio/undocommand.hpp>
namespace studio {
bool UndoCommand::mergeWith(UndoCommand const*) noexcept {
return false;
}
}

View File

@ -6,10 +6,6 @@
namespace studio {
bool UndoCommand::mergeWith(UndoCommand const*) noexcept {
return false;
}
void UndoStack::push(ox::UPtr<UndoCommand> &&cmd) noexcept {
for (auto const i = m_stackIdx; i < m_stack.size();) {
std::ignore = m_stack.erase(i);