From 27c0ed987891b8ab9e0e6da689314474d668de67 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Wed, 11 Aug 2021 12:39:16 -0700 Subject: [PATCH] warning fixes for new code Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> --- Code/Legacy/CrySystem/XConsole.cpp | 2 +- Gems/LyShine/Code/Source/StringUtfUtils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Legacy/CrySystem/XConsole.cpp b/Code/Legacy/CrySystem/XConsole.cpp index a69fd348f5..2293352f7e 100644 --- a/Code/Legacy/CrySystem/XConsole.cpp +++ b/Code/Legacy/CrySystem/XConsole.cpp @@ -2857,7 +2857,7 @@ void CXConsole::Paste() Utf8::Unchecked::octet_iterator end(data.end()); for (Utf8::Unchecked::octet_iterator it(data.begin()); it != end; ++it) { - const wchar_t cp = *it; + const wchar_t cp = static_cast(*it); if (cp != '\r') { // Convert UCS code-point into UTF-8 string diff --git a/Gems/LyShine/Code/Source/StringUtfUtils.h b/Gems/LyShine/Code/Source/StringUtfUtils.h index 40dd22dd33..247eb07bca 100644 --- a/Gems/LyShine/Code/Source/StringUtfUtils.h +++ b/Gems/LyShine/Code/Source/StringUtfUtils.h @@ -31,7 +31,7 @@ namespace LyShine // work for cases tested but may not in general. // In the long run it would be better to eliminate // this function and use some sequence_lenght function that is not internal. - return Utf8::Internal::sequence_length(&multiByteChar); + return aznumeric_cast(Utf8::Internal::sequence_length(&multiByteChar)); } inline int GetByteLengthOfUtf8Chars(const char* utf8String, int numUtf8Chars)