From dcfeae1cc9ad9327552fbf48d78ca3bd594601f9 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Fri, 6 Aug 2021 16:24:06 -0700 Subject: [PATCH] warnings not previously detected (#2954) Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Gems/LyShine/Code/Editor/Animation/UiAnimUndoManager.cpp | 2 +- Gems/LyShine/Code/Editor/AssetTreeEntry.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/LyShine/Code/Editor/Animation/UiAnimUndoManager.cpp b/Gems/LyShine/Code/Editor/Animation/UiAnimUndoManager.cpp index 82eb6091e6..025b8c94d8 100644 --- a/Gems/LyShine/Code/Editor/Animation/UiAnimUndoManager.cpp +++ b/Gems/LyShine/Code/Editor/Animation/UiAnimUndoManager.cpp @@ -59,7 +59,7 @@ public: virtual bool IsEmpty() const { return m_undoObjects.empty(); }; virtual void Undo(bool bUndo) { - for (int i = m_undoObjects.size() - 1; i >= 0; i--) + for (int i = aznumeric_cast(m_undoObjects.size()) - 1; i >= 0; i--) { m_undoObjects[i]->Undo(bUndo); } diff --git a/Gems/LyShine/Code/Editor/AssetTreeEntry.cpp b/Gems/LyShine/Code/Editor/AssetTreeEntry.cpp index caff5d2da0..5a281ba312 100644 --- a/Gems/LyShine/Code/Editor/AssetTreeEntry.cpp +++ b/Gems/LyShine/Code/Editor/AssetTreeEntry.cpp @@ -136,7 +136,7 @@ AssetTreeEntry* AssetTreeEntry::BuildAssetTree(const AZ::Data::AssetType& assetT // product name stored in db is in all lower case, but we want to preserve case here AzFramework::StringFunc::Path::Split(product->GetParent()->GetRelativePath().c_str(), nullptr, &path, &name); // find next character position after default slice path in order to generate hierarchical sub-menus matching the subfolders - int pos = AzFramework::StringFunc::Find(path.c_str(), pathToSearch.c_str()) + pathToSearch.length(); + const size_t pos = AzFramework::StringFunc::Find(path.c_str(), pathToSearch.c_str()) + pathToSearch.length(); assetTree->Insert(path.substr(pos), name, product->GetAssetId()); } return assetTree;