From 15c39d7028f9eeea135a3af45f8a8d214df227b0 Mon Sep 17 00:00:00 2001 From: Kah Wei Date: Sat, 1 Oct 2022 22:58:19 +0800 Subject: [PATCH] Removed mixed tabs and spaces --- SHADE_Engine/src/Scripting/SHScriptEngine.h | 12 +++++------ SHADE_Managed/src/Editor/UndoRedoStack.cxx | 24 ++++++++++----------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/SHADE_Engine/src/Scripting/SHScriptEngine.h b/SHADE_Engine/src/Scripting/SHScriptEngine.h index 0d2c0c96..239d6b90 100644 --- a/SHADE_Engine/src/Scripting/SHScriptEngine.h +++ b/SHADE_Engine/src/Scripting/SHScriptEngine.h @@ -175,10 +175,10 @@ namespace SHADE /// Performs an undo for script inspector changes if it exists. /// void UndoScriptInspectorChanges() const; - /// - /// Performs a redo for script inspector changes if it exists. - /// - void RedoScriptInspectorChanges() const; + /// + /// Performs a redo for script inspector changes if it exists. + /// + void RedoScriptInspectorChanges() const; /*-----------------------------------------------------------------------------*/ /* Static Utility Functions */ @@ -251,8 +251,8 @@ namespace SHADE CsScriptSerialiseYamlFuncPtr csScriptDeserialiseYaml = nullptr; // - Editor CsScriptEditorFuncPtr csEditorRenderScripts = nullptr; - CsFuncPtr csEditorUndo = nullptr; - CsFuncPtr csEditorRedo = nullptr; + CsFuncPtr csEditorUndo = nullptr; + CsFuncPtr csEditorRedo = nullptr; /*-----------------------------------------------------------------------------*/ /* Event Handler Functions */ diff --git a/SHADE_Managed/src/Editor/UndoRedoStack.cxx b/SHADE_Managed/src/Editor/UndoRedoStack.cxx index 7a3b1930..08e289cc 100644 --- a/SHADE_Managed/src/Editor/UndoRedoStack.cxx +++ b/SHADE_Managed/src/Editor/UndoRedoStack.cxx @@ -22,15 +22,15 @@ of DigiPen Institute of Technology is prohibited. namespace SHADE { - bool UndoRedoStack::UndoActionPresent::get() - { - return commandStack->Count > 0 && latestActionIndex >= 0; - } + bool UndoRedoStack::UndoActionPresent::get() + { + return commandStack->Count > 0 && latestActionIndex >= 0; + } - bool UndoRedoStack::RedoActionPresent::get() - { + bool UndoRedoStack::RedoActionPresent::get() + { return latestActionIndex >= 0 && latestActionIndex < commandStack->Count - 1; - } + } void UndoRedoStack::Add(Command command) { @@ -47,7 +47,7 @@ namespace SHADE latestActionIndex = commandStack->Count - 1; } - void UndoRedoStack::Undo() + void UndoRedoStack::Undo() { if (!UndoActionPresent) return; @@ -60,10 +60,10 @@ namespace SHADE void UndoRedoStack::Redo() { if (!RedoActionPresent) - return; + return; - Command cmd = commandStack[latestActionIndex]; - cmd.Field->SetValue(cmd.Object, cmd.NewData); - ++latestActionIndex; + Command cmd = commandStack[latestActionIndex]; + cmd.Field->SetValue(cmd.Object, cmd.NewData); + ++latestActionIndex; } }