@lumberyard-employee-dm suggestion to use (w)string_view as the src to simplify functions in conversions.h
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -59,7 +59,7 @@ namespace AzFramework
|
||||
{
|
||||
// Convert the valid UTF-16 surrogate pair to a UTF-8 code point
|
||||
const wchar_t codePointUTF16[2] = { m_leadSurrogate, codeUnitUTF16 };
|
||||
AZStd::to_string(codePointUTF8, codePointUTF16, 2);
|
||||
AZStd::to_string(codePointUTF8, { codePointUTF16, 2 });
|
||||
m_leadSurrogate = 0;
|
||||
}
|
||||
else
|
||||
@@ -72,7 +72,7 @@ namespace AzFramework
|
||||
{
|
||||
// Convert the standalone UTF-16 code point to a UTF-8 code point
|
||||
const wchar_t codePointUTF16[1] = { codeUnitUTF16 };
|
||||
AZStd::to_string(codePointUTF8, codePointUTF16, 1);
|
||||
AZStd::to_string(codePointUTF8, { codePointUTF16, 1 });
|
||||
m_leadSurrogate = 0;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -253,7 +253,7 @@ namespace AzFramework
|
||||
if (stringLength != 0)
|
||||
{
|
||||
// Convert UTF-16 to UTF-8
|
||||
AZStd::to_string(o_keyOrButtonText, buffer, stringLength);
|
||||
AZStd::to_string(o_keyOrButtonText, { buffer, aznumeric_cast<size_t>(stringLength) });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user