change conversions to static_cast
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -83,12 +83,12 @@ struct SANDBOX_API DisplayContext
|
||||
// Draw functions
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Set current materialc color.
|
||||
void SetColor(float r, float g, float b, float a = 1) { m_color4b = ColorB(aznumeric_cast<uint8>(r * 255.0f), aznumeric_cast<uint8>(g * 255.0f), aznumeric_cast<uint8>(b * 255.0f), aznumeric_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const Vec3& color, float a = 1) { m_color4b = ColorB(aznumeric_cast<uint8>(color.x * 255.0f), aznumeric_cast<uint8>(color.y * 255.0f), aznumeric_cast<uint8>(color.z * 255.0f), aznumeric_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& rgb, float a) { m_color4b = ColorB(aznumeric_cast<uint8>(rgb.red()), aznumeric_cast<uint8>(rgb.green()), aznumeric_cast<uint8>(rgb.blue()), aznumeric_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& color) { m_color4b = ColorB(aznumeric_cast<uint8>(color.red()), aznumeric_cast<uint8>(color.green()), aznumeric_cast<uint8>(color.blue()), aznumeric_cast<uint8>(color.alpha())); };
|
||||
void SetColor(float r, float g, float b, float a = 1) { m_color4b = ColorB(static_cast<uint8>(r * 255.0f), static_cast<uint8>(g * 255.0f), static_cast<uint8>(b * 255.0f), static_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const Vec3& color, float a = 1) { m_color4b = ColorB(static_cast<uint8>(color.x * 255.0f), static_cast<uint8>(color.y * 255.0f), static_cast<uint8>(color.z * 255.0f), static_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& rgb, float a) { m_color4b = ColorB(static_cast<uint8>(rgb.red()), static_cast<uint8>(rgb.green()), static_cast<uint8>(rgb.blue()), static_cast<uint8>(a * 255.0f)); };
|
||||
void SetColor(const QColor& color) { m_color4b = ColorB(static_cast<uint8>(color.red()), static_cast<uint8>(color.green()), static_cast<uint8>(color.blue()), static_cast<uint8>(color.alpha())); };
|
||||
void SetColor(const ColorB& color) { m_color4b = color; };
|
||||
void SetAlpha(float a = 1) { m_color4b.a = aznumeric_cast<uint8>(a * 255.0f); };
|
||||
void SetAlpha(float a = 1) { m_color4b.a = static_cast<uint8>(a * 255.0f); };
|
||||
ColorB GetColor() const { return m_color4b; }
|
||||
|
||||
void SetSelectedColor(float fAlpha = 1);
|
||||
|
||||
@@ -64,14 +64,14 @@ inline GUID GuidUtil::FromString(const char* guidString)
|
||||
guid.Data3 = 0;
|
||||
azsscanf(guidString, "{%8" SCNx32 "-%4hX-%4hX-%2X%2X-%2X%2X%2X%2X%2X%2X}",
|
||||
&guid.Data1, &guid.Data2, &guid.Data3, &d[0], &d[1], &d[2], &d[3], &d[4], &d[5], &d[6], &d[7]);
|
||||
guid.Data4[0] = aznumeric_cast<unsigned char>(d[0]);
|
||||
guid.Data4[1] = aznumeric_cast<unsigned char>(d[1]);
|
||||
guid.Data4[2] = aznumeric_cast<unsigned char>(d[2]);
|
||||
guid.Data4[3] = aznumeric_cast<unsigned char>(d[3]);
|
||||
guid.Data4[4] = aznumeric_cast<unsigned char>(d[4]);
|
||||
guid.Data4[5] = aznumeric_cast<unsigned char>(d[5]);
|
||||
guid.Data4[6] = aznumeric_cast<unsigned char>(d[6]);
|
||||
guid.Data4[7] = aznumeric_cast<unsigned char>(d[7]);
|
||||
guid.Data4[0] = static_cast<unsigned char>(d[0]);
|
||||
guid.Data4[1] = static_cast<unsigned char>(d[1]);
|
||||
guid.Data4[2] = static_cast<unsigned char>(d[2]);
|
||||
guid.Data4[3] = static_cast<unsigned char>(d[3]);
|
||||
guid.Data4[4] = static_cast<unsigned char>(d[4]);
|
||||
guid.Data4[5] = static_cast<unsigned char>(d[5]);
|
||||
guid.Data4[6] = static_cast<unsigned char>(d[6]);
|
||||
guid.Data4[7] = static_cast<unsigned char>(d[7]);
|
||||
|
||||
return guid;
|
||||
}
|
||||
|
||||
@@ -405,7 +405,7 @@ public:
|
||||
unsigned char GetDataType() const { return m_dataType; };
|
||||
void SetDataType(unsigned char dataType) { m_dataType = dataType; }
|
||||
|
||||
void SetFlags(int flags) { m_flags = aznumeric_cast<uint16>(flags); }
|
||||
void SetFlags(int flags) { m_flags = static_cast<uint16>(flags); }
|
||||
int GetFlags() const { return m_flags; }
|
||||
void SetFlagRecursive(EFlags flag) { m_flags |= flag; }
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -76,9 +76,9 @@ namespace ImageProcessingAtom
|
||||
for (int r = 0; r < ePS_Red; ++r)
|
||||
{
|
||||
SColor col;
|
||||
col.r = aznumeric_cast<unsigned char>(255 * r / (ePS_Red));
|
||||
col.g = aznumeric_cast<unsigned char>(255 * g / (ePS_Green));
|
||||
col.b = aznumeric_cast<unsigned char>(255 * b / (ePS_Blue));
|
||||
col.r = static_cast<unsigned char>(255 * r / (ePS_Red));
|
||||
col.g = static_cast<unsigned char>(255 * g / (ePS_Green));
|
||||
col.b = static_cast<unsigned char>(255 * b / (ePS_Blue));
|
||||
int l = 255 - (col.r * 3 + col.g * 6 + col.b) / 10;
|
||||
col.r = col.g = col.b = (unsigned char)l;
|
||||
m_mapping.push_back(col);
|
||||
|
||||
@@ -97,8 +97,8 @@ namespace ImageProcessingAtom
|
||||
RHI::Format format = Utils::PixelFormatToRHIFormat(m_imageObject->GetPixelFormat(), m_imageObject->HasImageFlags(EIF_SRGBRead));
|
||||
RHI::ImageBindFlags bindFlag = RHI::ImageBindFlags::ShaderRead;
|
||||
|
||||
RHI::ImageDescriptor imageDesc = RHI::ImageDescriptor::Create2DArray(bindFlag, imageWidth, imageHeight, aznumeric_cast<uint16_t>(arraySize), format);
|
||||
imageDesc.m_mipLevels = aznumeric_cast<uint16_t>(m_imageObject->GetMipCount());
|
||||
RHI::ImageDescriptor imageDesc = RHI::ImageDescriptor::Create2DArray(bindFlag, imageWidth, imageHeight, static_cast<uint16_t>(arraySize), format);
|
||||
imageDesc.m_mipLevels = static_cast<uint16_t>(m_imageObject->GetMipCount());
|
||||
if (m_imageObject->HasImageFlags(EIF_Cubemap))
|
||||
{
|
||||
imageDesc.m_isCubemap = true;
|
||||
@@ -227,7 +227,7 @@ namespace ImageProcessingAtom
|
||||
{
|
||||
RPI::ImageMipChainAssetCreator builder;
|
||||
uint32_t arraySize = m_imageObject->HasImageFlags(EIF_Cubemap) ? 6 : 1;
|
||||
builder.Begin(chainAssetId, aznumeric_cast<uint16_t>(mipLevels), aznumeric_cast<uint16_t>(arraySize));
|
||||
builder.Begin(chainAssetId, static_cast<uint16_t>(mipLevels), static_cast<uint16_t>(arraySize));
|
||||
|
||||
for (uint32_t mip = startMip; mip < startMip + mipLevels; mip++)
|
||||
{
|
||||
|
||||
@@ -179,10 +179,10 @@ namespace AZ
|
||||
RHI::Size targetImageSize = outputAttachment->m_descriptor.m_image.m_size;
|
||||
|
||||
|
||||
m_viewportState.m_maxX = aznumeric_cast<float>(AZStd::min(static_cast<uint32_t>(params.m_viewportState.m_maxX), targetImageSize.m_width));
|
||||
m_viewportState.m_maxY = aznumeric_cast<float>(AZStd::min(static_cast<uint32_t>(params.m_viewportState.m_maxY), targetImageSize.m_height));
|
||||
m_viewportState.m_minX = aznumeric_cast<float>(AZStd::min(params.m_viewportState.m_minX, m_viewportState.m_maxX));
|
||||
m_viewportState.m_minY = aznumeric_cast<float>(AZStd::min(params.m_viewportState.m_minY, m_viewportState.m_maxY));
|
||||
m_viewportState.m_maxX = static_cast<float>(AZStd::min(static_cast<uint32_t>(params.m_viewportState.m_maxX), targetImageSize.m_width));
|
||||
m_viewportState.m_maxY = static_cast<float>(AZStd::min(static_cast<uint32_t>(params.m_viewportState.m_maxY), targetImageSize.m_height));
|
||||
m_viewportState.m_minX = static_cast<float>(AZStd::min(params.m_viewportState.m_minX, m_viewportState.m_maxX));
|
||||
m_viewportState.m_minY = static_cast<float>(AZStd::min(params.m_viewportState.m_minY, m_viewportState.m_maxY));
|
||||
|
||||
m_scissorState.m_maxX = AZStd::min(static_cast<uint32_t>(params.m_scissorState.m_maxX), targetImageSize.m_width);
|
||||
m_scissorState.m_maxY = AZStd::min(static_cast<uint32_t>(params.m_scissorState.m_maxY), targetImageSize.m_height);
|
||||
|
||||
@@ -1092,8 +1092,8 @@ namespace AZ
|
||||
AZStd::sort(m_tableRows.begin(), m_tableRows.end(),
|
||||
[ascending](const TableRow& lhs, const TableRow& rhs)
|
||||
{
|
||||
const float lhsSize = aznumeric_cast<float>(lhs.m_sizeInBytes);
|
||||
const float rhsSize = aznumeric_cast<float>(rhs.m_sizeInBytes);
|
||||
const float lhsSize = static_cast<float>(lhs.m_sizeInBytes);
|
||||
const float rhsSize = static_cast<float>(rhs.m_sizeInBytes);
|
||||
return ascending ? lhsSize < rhsSize : lhsSize > rhsSize;
|
||||
});
|
||||
break;
|
||||
|
||||
+2
-2
@@ -104,7 +104,7 @@ namespace AZ::Render
|
||||
{
|
||||
if (GetShadowsEnabled() && GetLightHandle().IsValid())
|
||||
{
|
||||
GetFeatureProcessor()->SetPredictionSampleCount(GetLightHandle(), aznumeric_cast<uint16_t>(count));
|
||||
GetFeatureProcessor()->SetPredictionSampleCount(GetLightHandle(), static_cast<uint16_t>(count));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ namespace AZ::Render
|
||||
{
|
||||
if (GetShadowsEnabled() && GetLightHandle().IsValid())
|
||||
{
|
||||
GetFeatureProcessor()->SetFilteringSampleCount(GetLightHandle(), aznumeric_cast<uint16_t>(count));
|
||||
GetFeatureProcessor()->SetFilteringSampleCount(GetLightHandle(), static_cast<uint16_t>(count));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -57,31 +57,31 @@ namespace BarrierInput
|
||||
void InsertString(const char* str) { int len = static_cast<int>(strlen(str)); memcpy(end, str, len); end += len; }
|
||||
void InsertU32(int a)
|
||||
{
|
||||
end[0] = aznumeric_cast<AZ::u8>(a >> 24);
|
||||
end[1] = aznumeric_cast<AZ::u8>(a >> 16);
|
||||
end[2] = aznumeric_cast<AZ::u8>(a >> 8);
|
||||
end[3] = aznumeric_cast<AZ::u8>(a);
|
||||
end[0] = static_cast<AZ::u8>(a >> 24);
|
||||
end[1] = static_cast<AZ::u8>(a >> 16);
|
||||
end[2] = static_cast<AZ::u8>(a >> 8);
|
||||
end[3] = static_cast<AZ::u8>(a);
|
||||
end += 4;
|
||||
}
|
||||
void InsertU16(int a)
|
||||
{
|
||||
end[0] = aznumeric_cast<AZ::u8>(a >> 8);
|
||||
end[1] = aznumeric_cast<AZ::u8>(a);
|
||||
end[0] = static_cast<AZ::u8>(a >> 8);
|
||||
end[1] = static_cast<AZ::u8>(a);
|
||||
end += 2;
|
||||
}
|
||||
void InsertU8(int a)
|
||||
{
|
||||
end[0] = aznumeric_cast<AZ::u8>(a);
|
||||
end[0] = static_cast<AZ::u8>(a);
|
||||
end += 1;
|
||||
}
|
||||
void OpenPacket() { packet = end; end += 4; }
|
||||
void ClosePacket()
|
||||
{
|
||||
int len = GetLength() - sizeof(AZ::u32);
|
||||
packet[0] = aznumeric_cast<AZ::u8>(len >> 24);
|
||||
packet[1] = aznumeric_cast<AZ::u8>(len >> 16);
|
||||
packet[2] = aznumeric_cast<AZ::u8>(len >> 8);
|
||||
packet[3] = aznumeric_cast<AZ::u8>(len);
|
||||
packet[0] = static_cast<AZ::u8>(len >> 24);
|
||||
packet[1] = static_cast<AZ::u8>(len >> 16);
|
||||
packet[2] = static_cast<AZ::u8>(len >> 8);
|
||||
packet[3] = static_cast<AZ::u8>(len);
|
||||
packet = nullptr;
|
||||
}
|
||||
};
|
||||
@@ -405,7 +405,7 @@ namespace BarrierInput
|
||||
if (AZ::AzSock::IsAzSocketValid(m_socket))
|
||||
{
|
||||
AZ::AzSock::AzSocketAddress socketAddress;
|
||||
if (socketAddress.SetAddress(m_serverHostName.c_str(), aznumeric_cast<AZ::u16>(m_connectionPort)))
|
||||
if (socketAddress.SetAddress(m_serverHostName.c_str(), static_cast<AZ::u16>(m_connectionPort)))
|
||||
{
|
||||
const int result = AZ::AzSock::Connect(m_socket, socketAddress);
|
||||
if (!AZ::AzSock::SocketErrorOccured(result))
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace Camera
|
||||
});
|
||||
if (cameraIt != m_cameraItems.end())
|
||||
{
|
||||
int listIndex = aznumeric_cast<int>(cameraIt - m_cameraItems.begin());
|
||||
int listIndex = static_cast<int>(cameraIt - m_cameraItems.begin());
|
||||
beginRemoveRows(QModelIndex(), listIndex, listIndex);
|
||||
m_cameraItems.erase(cameraIt);
|
||||
endRemoveRows();
|
||||
|
||||
@@ -98,7 +98,7 @@ namespace EMotionFX
|
||||
void TestInput(const AZStd::string& paramName, std::vector<inputType> xInputs)
|
||||
{
|
||||
BlendTreeConnection* connection = m_floatMath1Node->AddConnection(m_paramNode,
|
||||
aznumeric_cast<uint16>(m_paramNode->FindOutputPortByName(paramName)->m_portId), BlendTreeFloatMath1Node::PORTID_INPUT_X);
|
||||
static_cast<uint16>(m_paramNode->FindOutputPortByName(paramName)->m_portId), BlendTreeFloatMath1Node::PORTID_INPUT_X);
|
||||
|
||||
for (inputType i : xInputs)
|
||||
{
|
||||
|
||||
@@ -137,9 +137,9 @@ namespace EMotionFX
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, ReachablePositionsOutputCorrectPose)
|
||||
{
|
||||
// Set values for vector3 and twoLinkIKNode weight parameter
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, aznumeric_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, static_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
aznumeric_cast<uint16>(m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
static_cast<uint16>(m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
const float weight = testing::get<0>(GetParam());
|
||||
@@ -179,7 +179,7 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, ReachableAlignToNodeOutputCorrectPose)
|
||||
{
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, aznumeric_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId),
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, static_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId),
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
|
||||
GetEMotionFX().Update(1.0f / 60.0f);
|
||||
@@ -224,7 +224,7 @@ namespace EMotionFX
|
||||
|
||||
TEST_P(BlendTreeTwoLinkIKNodeFixture, UnreachablePositionsOutputCorrectPose)
|
||||
{
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, aznumeric_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId),
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, static_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId),
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
static_cast<uint16>(m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
@@ -275,7 +275,7 @@ namespace EMotionFX
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode, static_cast<uint16>(m_paramNode->FindOutputPortByName("WeightParam")->m_portId),
|
||||
BlendTreeTwoLinkIKNode::INPUTPORT_WEIGHT);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
aznumeric_cast<uint16>(m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
static_cast<uint16>(m_paramNode->FindOutputPortByName("GoalPosParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_GOALPOS);
|
||||
m_twoLinkIKNode->AddConnection(m_paramNode,
|
||||
static_cast<uint16>(m_paramNode->FindOutputPortByName("RotationParam")->m_portId), BlendTreeTwoLinkIKNode::INPUTPORT_GOALROT);
|
||||
m_twoLinkIKNode->SetRotationEnabled(true);
|
||||
|
||||
@@ -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 aznumeric_cast<int>(Utf8::Internal::sequence_length(&multiByteChar));
|
||||
return static_cast<int>(Utf8::Internal::sequence_length(&multiByteChar));
|
||||
}
|
||||
|
||||
inline int GetByteLengthOfUtf8Chars(const char* utf8String, int numUtf8Chars)
|
||||
|
||||
@@ -463,7 +463,7 @@ void UiFaderComponent::CreateOrResizeRenderTarget(const AZ::Vector2& pixelAligne
|
||||
// Create a render target that this element and its children will be rendered to
|
||||
AZ::EntityId canvasEntityId;
|
||||
EBUS_EVENT_ID_RESULT(canvasEntityId, GetEntityId(), UiElementBus, GetCanvasEntityId);
|
||||
AZ::RHI::Size imageSize(aznumeric_cast<uint32_t>(renderTargetSize.GetX()), aznumeric_cast<uint32_t>(renderTargetSize.GetY()), 1);
|
||||
AZ::RHI::Size imageSize(static_cast<uint32_t>(renderTargetSize.GetX()), static_cast<uint32_t>(renderTargetSize.GetY()), 1);
|
||||
EBUS_EVENT_ID_RESULT(m_attachmentImageId, canvasEntityId, LyShine::RenderToTextureRequestBus, UseRenderTarget, AZ::Name(m_renderTargetName.c_str()), imageSize);
|
||||
if (m_attachmentImageId.IsEmpty())
|
||||
{
|
||||
|
||||
@@ -564,7 +564,7 @@ void UiMaskComponent::CreateOrResizeRenderTarget(const AZ::Vector2& pixelAligned
|
||||
// Create a render target that this element and its children will be rendered to
|
||||
AZ::EntityId canvasEntityId;
|
||||
EBUS_EVENT_ID_RESULT(canvasEntityId, GetEntityId(), UiElementBus, GetCanvasEntityId);
|
||||
AZ::RHI::Size imageSize(aznumeric_cast<uint32_t>(renderTargetSize.GetX()), aznumeric_cast<uint32_t>(renderTargetSize.GetY()), 1);
|
||||
AZ::RHI::Size imageSize(static_cast<uint32_t>(renderTargetSize.GetX()), static_cast<uint32_t>(renderTargetSize.GetY()), 1);
|
||||
EBUS_EVENT_ID_RESULT(m_contentAttachmentImageId, canvasEntityId, LyShine::RenderToTextureRequestBus, UseRenderTarget, AZ::Name(m_renderTargetName.c_str()), imageSize);
|
||||
if (m_contentAttachmentImageId.IsEmpty())
|
||||
{
|
||||
@@ -762,7 +762,7 @@ void UiMaskComponent::RenderUsingGradientMask(LyShine::IRenderGraph* renderGraph
|
||||
{
|
||||
// go through all the cached vertices and update the alpha values
|
||||
UCol desiredPackedColor = m_cachedPrimitive.m_vertices[0].color;
|
||||
desiredPackedColor.a = aznumeric_cast<uint8>(desiredPackedAlpha);
|
||||
desiredPackedColor.a = static_cast<uint8>(desiredPackedAlpha);
|
||||
for (int i = 0; i < m_cachedPrimitive.m_numVertices; ++i)
|
||||
{
|
||||
m_cachedPrimitive.m_vertices[i].color = desiredPackedColor;
|
||||
|
||||
Reference in New Issue
Block a user