From e7f07147cb432473ca71a0fc3790ff21235d8f05 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 13 Aug 2021 16:04:31 -0700 Subject: [PATCH] More fixes for Code/Framework Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- .../AzCore/AzCore/Task/TaskExecutor.cpp | 4 +-- .../AzFramework/Script/ScriptComponent.cpp | 25 ++++++++++--------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp b/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp index 5edb09edf0..2bb88fbfa2 100644 --- a/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp +++ b/Code/Framework/AzCore/AzCore/Task/TaskExecutor.cpp @@ -78,7 +78,7 @@ namespace AZ return remaining; } - if (m_waitEvent && remaining == (m_parent ? 1 : 0)) + if (m_waitEvent && remaining == (m_parent ? 1u : 0u)) { m_waitEvent->Signal(); } @@ -259,7 +259,7 @@ namespace AZ } bool isRetained = task->m_graph->m_parent != nullptr; - if (task->m_graph->Release() == (isRetained ? 1 : 0)) + if (task->m_graph->Release() == (isRetained ? 1u : 0u)) { m_executor->ReleaseGraph(); } diff --git a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp index fb8ca8b892..6db205795e 100644 --- a/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp +++ b/Code/Framework/AzFramework/AzFramework/Script/ScriptComponent.cpp @@ -361,18 +361,19 @@ namespace AzFramework // DebugPrintStack // Prints the Lua stack starting from the bottom. //========================================================================= - static void DebugPrintStack(lua_State* lua, const AZStd::string& prefix = "") - { - AZStd::string dump = prefix; - const int stackSize = lua_gettop(lua); - for (int stackIdx = 1; stackIdx <= stackSize; ++stackIdx) - { - dump += PrintLuaValue(lua, stackIdx); - dump += " "; // add separator - } - - AZ_Warning("ScriptComponent", false, "Stack Dump: '%s'", dump.c_str()); - } + // DO NOT DELETE StackDump is useful to debug the lua stack. + //static void DebugPrintStack(lua_State* lua, const AZStd::string& prefix = "") + //{ + // AZStd::string dump = prefix; + // const int stackSize = lua_gettop(lua); + // for (int stackIdx = 1; stackIdx <= stackSize; ++stackIdx) + // { + // dump += PrintLuaValue(lua, stackIdx); + // dump += " "; // add separator + // } + // + // AZ_Warning("ScriptComponent", false, "Stack Dump: '%s'", dump.c_str()); + //} //========================================================================= // Properties__IndexFindSubtable