]> git.lizzy.rs Git - nothing.git/blobdiff - src/game/level/level_editor/undo_history.h
Merge pull request #1255 from tsoding/1253
[nothing.git] / src / game / level / level_editor / undo_history.h
index e5af7ccbefd655566bf38133f085426640bf0a2d..1c3cd43d159200b3c04ef6d03659cf7da4918b36 100644 (file)
@@ -7,15 +7,10 @@ typedef void (*RevertAction)(void *context, size_t context_size);
 
 typedef struct {
     RingBuffer actions;
+    Memory *memory;
 } UndoHistory;
 
-UndoHistory create_undo_history(void);
-
-static inline
-void destroy_undo_history(UndoHistory undo_history)
-{
-    destroy_ring_buffer(undo_history.actions);
-}
+UndoHistory *create_undo_history(Memory *memory);
 
 void undo_history_push(UndoHistory *undo_history,
                        RevertAction revert,
@@ -23,6 +18,8 @@ void undo_history_push(UndoHistory *undo_history,
                        size_t context_data_size);
 void undo_history_pop(UndoHistory *undo_history);
 
+void undo_history_clean(UndoHistory *undo_history);
+
 static inline
 int undo_history_empty(UndoHistory *undo_history)
 {