Fix some compilation errors due to warnings of potentially returning unitialized variables. (#5796)
Signed-off-by: moraaar <moraaar@amazon.com>
This commit is contained in:
@@ -293,7 +293,7 @@ namespace MCore
|
||||
// check if the test point is inside the polygon
|
||||
AZ::Vector2 ClosestPointToPoly(const AZ::Vector2* polyPoints, size_t numPoints, const AZ::Vector2& testPoint)
|
||||
{
|
||||
AZ::Vector2 result;
|
||||
AZ::Vector2 result = AZ::Vector2::CreateZero();
|
||||
float closestDist = FLT_MAX;
|
||||
for (size_t i = 0; i < numPoints; ++i)
|
||||
{
|
||||
|
||||
@@ -497,7 +497,7 @@ void CDraw2d::SetSortKey(int64_t key)
|
||||
AZ::Vector2 CDraw2d::Align(AZ::Vector2 position, AZ::Vector2 size,
|
||||
HAlign horizontalAlignment, VAlign verticalAlignment)
|
||||
{
|
||||
AZ::Vector2 result;
|
||||
AZ::Vector2 result = AZ::Vector2::CreateZero();
|
||||
switch (horizontalAlignment)
|
||||
{
|
||||
case HAlign::Left:
|
||||
|
||||
@@ -4936,7 +4936,7 @@ AZStd::string UiTextComponent::GetLocalizedText([[maybe_unused]] const AZStd::st
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
AZ::Vector2 UiTextComponent::CalculateAlignedPositionWithYOffset(const UiTransformInterface::RectPoints& points)
|
||||
{
|
||||
AZ::Vector2 pos;
|
||||
AZ::Vector2 pos = AZ::Vector2::CreateZero();
|
||||
const DrawBatchLines& drawBatchLines = GetDrawBatchLines();
|
||||
size_t numLinesOfText = drawBatchLines.batchLines.size();
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace ScriptCanvasEditor
|
||||
|
||||
AZ::TypeId DataTypePaletteModel::FindTypeIdForIndex(const QModelIndex& index) const
|
||||
{
|
||||
AZ::TypeId retVal;
|
||||
AZ::TypeId retVal = AZ::TypeId::CreateNull();
|
||||
|
||||
if (index.row() >= 0 && index.row() < m_variableTypes.size())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user