change conversions to static_cast
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -221,7 +221,7 @@ namespace AZ::IO::Internal
|
||||
? strncmp(left.data(), right.data(), maxCharsToCompare)
|
||||
: azstrnicmp(left.data(), right.data(), maxCharsToCompare);
|
||||
return charCompareResult == 0
|
||||
? aznumeric_cast<int>(aznumeric_cast<ptrdiff_t>(left.size()) - aznumeric_cast<ptrdiff_t>(right.size()))
|
||||
? static_cast<int>(aznumeric_cast<ptrdiff_t>(left.size()) - aznumeric_cast<ptrdiff_t>(right.size()))
|
||||
: charCompareResult;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <AzCore/std/string/conversions.h>
|
||||
#include <AzCore/std/containers/array.h>
|
||||
#include <AzCore/std/containers/fixed_vector.h>
|
||||
#include <AzCore/Casting/lossy_cast.h>
|
||||
#include <AzCore/Memory/Memory.h>
|
||||
#include <AzCore/Memory/OSAllocator.h>
|
||||
#include <AzCore/Memory/SystemAllocator.h>
|
||||
@@ -343,8 +342,8 @@ namespace AZ::StringFunc::Internal
|
||||
{
|
||||
for (const char stripCharacter : stripCharacters)
|
||||
{
|
||||
const char lower = azlossy_cast<char>(tolower(stripCharacter));
|
||||
const char upper = azlossy_cast<char>(toupper(stripCharacter));
|
||||
const char lower = static_cast<char>(tolower(stripCharacter));
|
||||
const char upper = static_cast<char>(toupper(stripCharacter));
|
||||
if (lower != upper)
|
||||
{
|
||||
combinedStripCharacters.push_back(lower);
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
#include <AzCore/Debug/StackTracer.h>
|
||||
#include <AzCore/Debug/Trace.h>
|
||||
#include <AzCore/Math/Sfmt.h>
|
||||
#include <AzCore/Casting/lossy_cast.h>
|
||||
|
||||
|
||||
namespace Internal
|
||||
@@ -298,7 +297,7 @@ AZ_POP_DISABLE_WARNING
|
||||
// the overflow guard is generated out of rand, so we set a fixed seed before doing the allocation
|
||||
// to get a deterministic guard
|
||||
srand(0);
|
||||
const unsigned char expectedInitialGuard = azlossy_cast<unsigned char>(rand());
|
||||
const unsigned char expectedInitialGuard = static_cast<unsigned char>(rand());
|
||||
|
||||
srand(0);
|
||||
TestClass<16>* someObject = aznew TestClass<16>();
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <AzCore/std/chrono/chrono.h>
|
||||
#include <AzCore/std/string/conversions.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
#include <AzCore/Casting/lossy_cast.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <io.h>
|
||||
@@ -285,7 +284,7 @@ char* CRCfix::GetToken(FILE* infile, FILE* outfile)
|
||||
{
|
||||
if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') || c == '#' || c == '_')
|
||||
{
|
||||
token[i++] = azlossy_cast<char>(c);
|
||||
token[i++] = static_cast<char>(c);
|
||||
continue;
|
||||
}
|
||||
else
|
||||
@@ -376,7 +375,7 @@ void CRCfix::GetPreviousCRC(char* token, FILE* infile)
|
||||
int c;
|
||||
while ((c = fgetc(infile)) != ')')
|
||||
{
|
||||
*token++ = azlossy_cast<char>(c);
|
||||
*token++ = static_cast<char>(c);
|
||||
}
|
||||
*token = 0;
|
||||
}
|
||||
@@ -427,7 +426,7 @@ int CRCfix::Fix(Filename srce)
|
||||
if (strcmp(token, "AZ_CRC") == 0 && lastchar == '(')
|
||||
{
|
||||
size_t i = strlen(token);
|
||||
token[i++] = azlossy_cast<char>(lastchar);
|
||||
token[i++] = static_cast<char>(lastchar);
|
||||
int c = fgetc(infile);
|
||||
|
||||
if (c == '"')
|
||||
@@ -436,11 +435,11 @@ int CRCfix::Fix(Filename srce)
|
||||
|
||||
do
|
||||
{
|
||||
token[i++] = azlossy_cast<char>(c);
|
||||
token[i++] = static_cast<char>(c);
|
||||
c = fgetc(infile);
|
||||
} while (c != '"');
|
||||
|
||||
token[i++] = azlossy_cast<char>(c);
|
||||
token[i++] = static_cast<char>(c);
|
||||
c = fgetc(infile);
|
||||
|
||||
int oldcrc = 0, newcrc;
|
||||
|
||||
Reference in New Issue
Block a user