]> git.lizzy.rs Git - nothing.git/commitdiff
(#164) Make undo_history translation unit more unity build friendly
authorrexim <reximkut@gmail.com>
Wed, 4 Dec 2019 15:44:42 +0000 (22:44 +0700)
committerrexim <reximkut@gmail.com>
Thu, 5 Dec 2019 14:13:17 +0000 (21:13 +0700)
src/game/level/level_editor/undo_history.c

index 5aba786d37b5593df6a3f43c11f4636255c7fb99..7a51aaba9e62a87d5643bd631e5ca252b1e9b03d 100644 (file)
@@ -10,7 +10,7 @@
 
 typedef struct {
     RevertAction revert;
-} Action;
+} HistoryAction;
 
 void undo_history_push(UndoHistory *undo_history,
                        RevertAction revert,
@@ -19,7 +19,7 @@ void undo_history_push(UndoHistory *undo_history,
 {
     trace_assert(undo_history);
 
-    Action action = {
+    HistoryAction action = {
         .revert = revert,
     };
 
@@ -32,7 +32,7 @@ void undo_history_pop(UndoHistory *undo_history)
     trace_assert(undo_history);
 
     if (stack_empty(&undo_history->actions) > 0) {
-        Action action = *(Action *)stack_top_element(&undo_history->actions);
+        HistoryAction action = *(HistoryAction *)stack_top_element(&undo_history->actions);
         stack_pop(&undo_history->actions);
 
         size_t context_size = stack_top_size(&undo_history->actions);