SPEC-2513 Fixes to enable w4457

main
Esteban Papp 5 years ago committed by GitHub
parent aa700fc97f
commit 76a6df341b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -139,7 +139,7 @@ namespace AzNetworking
NetworkOutputSerializer networkSerializer(buffer.GetBuffer(), buffer.GetSize());
{
ISerializer& serializer = networkSerializer; // To get the default typeinfo parameters in ISerializer
ISerializer& networkISerializer = networkSerializer; // To get the default typeinfo parameters in ISerializer
// First, serialize out the header
if (!header.SerializePacketFlags(networkSerializer))
@ -148,7 +148,7 @@ namespace AzNetworking
return false;
}
if (!serializer.Serialize(header, "Header"))
if (!networkISerializer.Serialize(header, "Header"))
{
AZLOG(NET_FragmentQueue, "Reconstructed fragmented packet failed header serialization");
return false;

@ -118,10 +118,10 @@ void CVarMenu::AddUniqueCVarsItem(QString displayName,
// Otherwise we could have just used the action's currently checked
// state and updated the CVar's value only
bool cVarOn = (cVar->GetFVal() == availableCVar.m_onValue);
bool checked = !cVarOn;
SetCVar(cVar, checked ? availableCVar.m_onValue : availableCVar.m_offValue);
action->setChecked(checked);
if (checked)
bool cVarChecked = !cVarOn;
SetCVar(cVar, cVarChecked ? availableCVar.m_onValue : availableCVar.m_offValue);
action->setChecked(cVarChecked);
if (cVarChecked)
{
// Set the rest of the CVars in the group to their off values
SetCVarsToOffValue(availableCVars, availableCVar);
@ -132,9 +132,9 @@ void CVarMenu::AddUniqueCVarsItem(QString displayName,
// Initialize the action's checked state based on its associated CVar's current value
ICVar* cVar = gEnv->pConsole->GetCVar(availableCVar.m_cVarName.toUtf8().data());
bool checked = (cVar && cVar->GetFVal() == availableCVar.m_onValue);
action->setChecked(checked);
if (checked)
bool cVarChecked = (cVar && cVar->GetFVal() == availableCVar.m_onValue);
action->setChecked(cVarChecked);
if (cVarChecked)
{
// Set the rest of the CVars in the group to their off values
SetCVarsToOffValue(availableCVars, availableCVar);

@ -205,10 +205,10 @@ CTrackViewAnimNode::CTrackViewAnimNode(IAnimSequence* pSequence, IAnimNode* anim
for (int i = 0; i < nodeCount; ++i)
{
IAnimNode* node = pSequence->GetNode(i);
IAnimNode* pParentNode = node->GetParent();
IAnimNode* pNodeParentNode = node->GetParent();
// If our node is the parent, then the current node is a child of it
if (animNode == pParentNode)
if (animNode == pNodeParentNode)
{
CTrackViewAnimNodeFactory animNodeFactory;
CTrackViewAnimNode* pNewTVAnimNode = animNodeFactory.BuildAnimNode(pSequence, node, this);

@ -68,12 +68,12 @@ CTrackViewTrack::CTrackViewTrack(IAnimTrack* pTrack, CTrackViewAnimNode* pTrackA
{
// Search for child tracks
const unsigned int subTrackCount = m_pAnimTrack->GetSubTrackCount();
for (unsigned int subTrackIndex = 0; subTrackIndex < subTrackCount; ++subTrackIndex)
for (unsigned int subTrackI = 0; subTrackI < subTrackCount; ++subTrackI)
{
IAnimTrack* pSubTrack = m_pAnimTrack->GetSubTrack(subTrackIndex);
IAnimTrack* pSubTrack = m_pAnimTrack->GetSubTrack(subTrackI);
CTrackViewTrackFactory trackFactory;
CTrackViewTrack* pNewTVTrack = trackFactory.BuildTrack(pSubTrack, pTrackAnimNode, this, true, subTrackIndex);
CTrackViewTrack* pNewTVTrack = trackFactory.BuildTrack(pSubTrack, pTrackAnimNode, this, true, subTrackI);
m_childNodes.push_back(std::unique_ptr<CTrackViewNode>(pNewTVTrack));
}

@ -261,8 +261,8 @@ namespace AZ
if (vulkanDescriptor.m_constantDataPool && constantDataSize)
{
m_constantDataBuffer = Buffer::Create();
const RHI::BufferDescriptor descriptor(RHI::BufferBindFlags::Constant, constantDataSize);
RHI::BufferInitRequest request(*m_constantDataBuffer, descriptor);
const RHI::BufferDescriptor bufferDescriptor(RHI::BufferBindFlags::Constant, constantDataSize);
RHI::BufferInitRequest request(*m_constantDataBuffer, bufferDescriptor);
RHI::ResultCode rhiResult = vulkanDescriptor.m_constantDataPool->InitBuffer(request);
if (rhiResult != RHI::ResultCode::Success)
{

@ -510,9 +510,9 @@ namespace ShaderManagementConsole
AZStd::vector<AZ::Uuid> documentIdsToClose;
documentIdsToClose.reserve(m_tabWidget->count());
const AZ::Uuid documentIdToKeepOpen = GetDocumentIdFromTab(tabIndex);
for (int tabIndex = 0; tabIndex < m_tabWidget->count(); ++tabIndex)
for (int tabI = 0; tabI < m_tabWidget->count(); ++tabI)
{
const AZ::Uuid documentId = GetDocumentIdFromTab(tabIndex);
const AZ::Uuid documentId = GetDocumentIdFromTab(tabI);
if (documentId != documentIdToKeepOpen)
{
documentIdsToClose.push_back(documentId);

@ -287,9 +287,9 @@ namespace AudioControls
QDataStream stream(&encoded, QIODevice::ReadOnly);
while (!stream.atEnd())
{
int row, col;
int streamRow, streamCol;
QMap<int, QVariant> roleDataMap;
stream >> row >> col >> roleDataMap;
stream >> streamRow >> streamCol >> roleDataMap;
if (!roleDataMap.isEmpty())
{
// If dropping a folder, make sure that folder name doesn't already exist where it is being dropped
@ -341,9 +341,9 @@ namespace AudioControls
{
QByteArray data = mimeData->data(format);
QDataStream stream(&data, QIODevice::ReadOnly);
int row, col;
int streamRow, streamCol;
QMap<int, QVariant> roleDataMap;
stream >> row >> col >> roleDataMap;
stream >> streamRow >> streamCol >> roleDataMap;
if (!roleDataMap.isEmpty() && roleDataMap[eDR_TYPE] != eIT_FOLDER)
{
return false;

@ -1628,18 +1628,18 @@ namespace MCommon
}
else
{
const float screenWidth = static_cast<float>(camera->GetScreenWidth());
const float screenHeight = static_cast<float>(camera->GetScreenHeight());
const float cameraScreenWidth = static_cast<float>(camera->GetScreenWidth());
const float cameraScreenHeight = static_cast<float>(camera->GetScreenHeight());
// find the 4 corners of the frustum
AZ::Vector3 corners[4];
const AZ::Matrix4x4 inversedProjectionMatrix = MCore::InvertProjectionMatrix(camera->GetProjectionMatrix());
const AZ::Matrix4x4 inversedViewMatrix = MCore::InvertProjectionMatrix(camera->GetViewMatrix());
corners[0] = MCore::Unproject(0.0f, 0.0f, screenWidth, screenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[1] = MCore::Unproject(screenWidth, 0.0f, screenWidth, screenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[2] = MCore::Unproject(screenWidth, screenHeight, screenWidth, screenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[3] = MCore::Unproject(0.0f, screenHeight, screenWidth, screenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[0] = MCore::Unproject(0.0f, 0.0f, cameraScreenWidth, cameraScreenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[1] = MCore::Unproject(cameraScreenWidth, 0.0f, cameraScreenWidth, cameraScreenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[2] = MCore::Unproject(cameraScreenWidth, cameraScreenHeight, cameraScreenWidth, cameraScreenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
corners[3] = MCore::Unproject(0.0f, cameraScreenHeight, cameraScreenWidth, cameraScreenHeight, camera->GetFarClipDistance(), inversedProjectionMatrix, inversedViewMatrix);
// calculate the intersection points with the ground plane and create an AABB around those
// if there is no intersection point then use the ray target as point, which is the projection onto the far plane basically

@ -319,9 +319,9 @@ namespace EMotionFX
step.mDependencies.Clear(false);
// calculate the new dependencies for this step
for (ActorInstance* actorInstance : step.mActorInstances)
for (ActorInstance* stepActorInstance : step.mActorInstances)
{
AddDependenciesToStep(actorInstance, &step);
AddDependenciesToStep(stepActorInstance, &step);
}
// assume that there is only one of the same actor instance in the whole schedule

@ -91,10 +91,10 @@ namespace EMotionFX
}
else
{
AZ::Outcome<size_t> index = factory.FindRegisteredIndexByTypeId(instance);
if (index.IsSuccess())
AZ::Outcome<size_t> motionIndex = factory.FindRegisteredIndexByTypeId(instance);
if (motionIndex.IsSuccess())
{
GUI->setCurrentIndex(static_cast<int>(index.GetValue() + 1)); // +1 because we inserted an 'Automatic' one as first entry.
GUI->setCurrentIndex(static_cast<int>(motionIndex.GetValue() + 1)); // +1 because we inserted an 'Automatic' one as first entry.
}
else
{

@ -725,23 +725,23 @@ namespace GraphCanvas
case Attribute::LineColor:
case Attribute::StripeColor:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (IsColorValid(value))
if (IsColorValid(valueStr))
{
style->SetAttribute(attribute, ParseColor(value));
style->SetAttribute(attribute, ParseColor(valueStr));
}
break;
}
case Attribute::BackgroundImage:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (value.startsWith(QStringLiteral(":/")))
if (valueStr.startsWith(QStringLiteral(":/")))
{
value = QString("qrc%1").arg(value);
valueStr = QString("qrc%1").arg(valueStr);
}
QUrl url(value);
QUrl url(valueStr);
if (url.isValid())
{
style->SetAttribute(attribute, url);
@ -844,103 +844,103 @@ namespace GraphCanvas
case Attribute::BorderStyle:
case Attribute::LineStyle:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (IsLineStyleValid(value))
if (IsLineStyleValid(valueStr))
{
style->SetAttribute(attribute, QVariant::fromValue(ParseLineStyle(value)));
style->SetAttribute(attribute, QVariant::fromValue(ParseLineStyle(valueStr)));
}
break;
}
case Attribute::LineCurve:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (IsLineCurveValid(value))
if (IsLineCurveValid(valueStr))
{
style->SetAttribute(attribute, QVariant::fromValue(ParseLineCurve(value)));
style->SetAttribute(attribute, QVariant::fromValue(ParseLineCurve(valueStr)));
}
break;
}
case Attribute::CapStyle:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (IsCapStyleValid(value))
if (IsCapStyleValid(valueStr))
{
style->SetAttribute(attribute, QVariant::fromValue(ParseCapStyle(value)));
style->SetAttribute(attribute, QVariant::fromValue(ParseCapStyle(valueStr)));
}
break;
}
case Attribute::FontFamily:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (QString::compare(value, QLatin1String("default"), Qt::CaseInsensitive) == 0)
if (QString::compare(valueStr, QLatin1String("default"), Qt::CaseInsensitive) == 0)
{
value = defaultFontInfo.family();
valueStr = defaultFontInfo.family();
}
else
{
QFont font(value);
QFont font(valueStr);
QFontInfo info(font);
if (!info.exactMatch())
{
qWarning() << "Invalid font-family:" << value;
qWarning() << "Invalid font-family:" << valueStr;
}
}
style->SetAttribute(attribute, value);
style->SetAttribute(attribute, valueStr);
}
case Attribute::FontStyle:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (QString::compare(value, QLatin1String("default"), Qt::CaseInsensitive) == 0)
if (QString::compare(valueStr, QLatin1String("default"), Qt::CaseInsensitive) == 0)
{
style->SetAttribute(attribute, defaultFontInfo.style());
}
else
{
if (IsFontStyleValid(value))
if (IsFontStyleValid(valueStr))
{
style->SetAttribute(attribute, ParseFontStyle(value));
style->SetAttribute(attribute, ParseFontStyle(valueStr));
}
}
break;
}
case Attribute::FontWeight:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (QString::compare(value, QLatin1String("default"), Qt::CaseInsensitive) == 0)
if (QString::compare(valueStr, QLatin1String("default"), Qt::CaseInsensitive) == 0)
{
style->SetAttribute(attribute, defaultFontInfo.weight());
}
else
{
if (IsFontWeightValid(value))
if (IsFontWeightValid(valueStr))
{
style->SetAttribute(attribute, ParseFontWeight(value));
style->SetAttribute(attribute, ParseFontWeight(valueStr));
}
}
break;
}
case Attribute::FontVariant:
{
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
if (QString::compare(value, QLatin1String("default"), Qt::CaseInsensitive) == 0)
if (QString::compare(valueStr, QLatin1String("default"), Qt::CaseInsensitive) == 0)
{
style->SetAttribute(attribute, defaultFont.capitalization());
}
else
{
if (IsFontVariantValid(value))
if (IsFontVariantValid(valueStr))
{
style->SetAttribute(attribute, value);
style->SetAttribute(attribute, valueStr);
}
}
break;
@ -965,23 +965,23 @@ namespace GraphCanvas
break;
case Attribute::PaletteStyle:
{
QString value(member->value.GetString());
style->SetAttribute(attribute, QVariant::fromValue(ParsePaletteStyle(value)));
QString valueStr(member->value.GetString());
style->SetAttribute(attribute, QVariant::fromValue(ParsePaletteStyle(valueStr)));
break;
}
case Attribute::PatternTemplate:
case Attribute::PatternPalettes:
{
QString value(member->value.GetString());
style->SetAttribute(attribute, value);
QString valueStr(member->value.GetString());
style->SetAttribute(attribute, valueStr);
break;
}
case Attribute::Steps:
{
QList<QVariant> stepList;
QString value(member->value.GetString());
QString valueStr(member->value.GetString());
QStringList splitValues = value.split("|");
QStringList splitValues = valueStr.split("|");
for (QString currentString : splitValues)
{

@ -1325,12 +1325,12 @@ namespace GraphCanvas
AZStd::vector< Endpoint > endpoints;
SlotRequestBus::EventResult(endpoints, currentEndpoint.GetSlotId(), &SlotRequests::GetRemappedModelEndpoints);
for (const Endpoint& endpoint : endpoints)
for (const Endpoint& e : endpoints)
{
// If we haven't already processed the node, add it to our explore set so we can recurse.
if (retVal.count(endpoint) == 0)
if (retVal.count(e) == 0)
{
exploreSet.insert(endpoint);
exploreSet.insert(e);
}
}
}

@ -279,8 +279,8 @@ namespace GraphModel
m_connections.erase(iter);
#if defined(AZ_ENABLE_TRACING)
auto iter = AZStd::find(m_connections.begin(), m_connections.end(), connection);
AZ_Assert(iter == m_connections.end(), "Graph is broken. The same connection object was found multiple times.");
auto iterConnection = AZStd::find(m_connections.begin(), m_connections.end(), connection);
AZ_Assert(iterConnection == m_connections.end(), "Graph is broken. The same connection object was found multiple times.");
#endif
return true;

@ -110,10 +110,10 @@ CUiAnimViewAnimNode::CUiAnimViewAnimNode(IUiAnimSequence* pSequence, IUiAnimNode
for (int i = 0; i < nodeCount; ++i)
{
IUiAnimNode* pNode = pSequence->GetNode(i);
IUiAnimNode* pParentNode = pNode->GetParent();
IUiAnimNode* pNodeParentNode = pNode->GetParent();
// If our node is the parent, then the current node is a child of it
if (pAnimNode == pParentNode)
if (pAnimNode == pNodeParentNode)
{
CUiAnimViewAnimNodeFactory animNodeFactory;
CUiAnimViewAnimNode* pNewUiAVAnimNode = animNodeFactory.BuildAnimNode(pSequence, pNode, this);
@ -510,20 +510,20 @@ bool CUiAnimViewAnimNode::BaseClassPropertyPotentiallyChanged(
{
for (const AZ::SerializeContext::ClassElement& baseElement : baseClassData->m_elements)
{
size_t offset = baseClassOffset + baseElement.m_offset;
size_t baseOffset = baseClassOffset + baseElement.m_offset;
if (baseElement.m_flags & AZ::SerializeContext::ClassElement::FLG_BASE_CLASS)
{
if (BaseClassPropertyPotentiallyChanged(context, dstComponent, srcComponent, baseElement, offset))
if (BaseClassPropertyPotentiallyChanged(context, dstComponent, srcComponent, baseElement, baseOffset))
{
valueChanged = true;
}
}
else
{
if (HasComponentParamValueAzChanged(dstComponent, srcComponent, baseElement, offset))
if (HasComponentParamValueAzChanged(dstComponent, srcComponent, baseElement, baseOffset))
{
valueChanged = true;
AzEntityPropertyChanged(srcComponent, dstComponent, baseElement, offset);
AzEntityPropertyChanged(srcComponent, dstComponent, baseElement, baseOffset);
}
}
}

@ -59,12 +59,12 @@ CUiAnimViewTrack::CUiAnimViewTrack(IUiAnimTrack* pTrack, CUiAnimViewAnimNode* pT
{
// Search for child tracks
const unsigned int subTrackCount = m_pAnimTrack->GetSubTrackCount();
for (unsigned int subTrackIndex = 0; subTrackIndex < subTrackCount; ++subTrackIndex)
for (unsigned int subTrackI = 0; subTrackI < subTrackCount; ++subTrackI)
{
IUiAnimTrack* pSubTrack = m_pAnimTrack->GetSubTrack(subTrackIndex);
IUiAnimTrack* pSubTrack = m_pAnimTrack->GetSubTrack(subTrackI);
CUiAnimViewTrackFactory trackFactory;
CUiAnimViewTrack* pNewUiAVTrack = trackFactory.BuildTrack(pSubTrack, pTrackAnimNode, this, true, subTrackIndex);
CUiAnimViewTrack* pNewUiAVTrack = trackFactory.BuildTrack(pSubTrack, pTrackAnimNode, this, true, subTrackI);
m_childNodes.push_back(std::unique_ptr<CUiAnimViewNode>(pNewUiAVTrack));
}

@ -422,12 +422,12 @@ namespace Audio
if (stereoToMono)
{
// Samples are interleaved now, copy only left channel to the output
float* inputData = reinterpret_cast<float*>(m_conversionBufferIn.m_data);
float* outputData = reinterpret_cast<float*>(m_conversionBufferOut.m_data);
float* bufferInputData = reinterpret_cast<float*>(m_conversionBufferIn.m_data);
float* bufferOutputData = reinterpret_cast<float*>(m_conversionBufferOut.m_data);
for (AZ::u32 frame = 0; frame < numFrames; ++frame)
{
outputData[frame] = *inputData++;
++inputData;
bufferOutputData[frame] = *bufferInputData++;
++bufferInputData;
}
}
else // monoToStereo
@ -435,21 +435,21 @@ namespace Audio
// Split single samples to both left and right channels
if (shouldDeinterleave)
{
float* inputData = reinterpret_cast<float*>(m_conversionBufferIn.m_data);
float** outputData = reinterpret_cast<float**>(m_conversionBufferOut.m_data);
float* bufferInputData = reinterpret_cast<float*>(m_conversionBufferIn.m_data);
float** bufferOutputData = reinterpret_cast<float**>(m_conversionBufferOut.m_data);
for (AZ::u32 frame = 0; frame < numFrames; ++frame)
{
outputData[0][frame] = outputData[1][frame] = inputData[frame];
bufferOutputData[0][frame] = bufferOutputData[1][frame] = bufferInputData[frame];
}
}
else
{
float* inputData = reinterpret_cast<float*>(m_conversionBufferIn.m_data);
float* outputData = reinterpret_cast<float*>(m_conversionBufferOut.m_data);
float* bufferInputData = reinterpret_cast<float*>(m_conversionBufferIn.m_data);
float* bufferOutputData = reinterpret_cast<float*>(m_conversionBufferOut.m_data);
for (AZ::u32 frame = 0; frame < numFrames; ++frame)
{
*outputData++ = inputData[frame];
*outputData++ = inputData[frame];
*bufferOutputData++ = bufferInputData[frame];
*bufferOutputData++ = bufferInputData[frame];
}
}
}

@ -263,9 +263,9 @@ namespace Multiplayer
// Validate that we aren't already planning to remove this entity
if (safeToExit)
{
for (auto entityId : m_removeList)
for (auto remoteEntityId : m_removeList)
{
if (entityId == entityId)
if (remoteEntityId == remoteEntityId)
{
safeToExit = false;
}

@ -340,31 +340,31 @@ namespace
}
// Pass in the associated class data so we can do more intensive lookups?
const AZ::SerializeContext::ClassData* classData = serializeContext.FindClassData(node.first);
const AZ::SerializeContext::ClassData* nodeClassData = serializeContext.FindClassData(node.first);
if (classData == nullptr)
if (nodeClassData == nullptr)
{
continue;
}
// Detect primitive types os we avoid making nodes out of them.
// Or anything that is 'pure data' and should be populated through a different mechanism.
if (classData->m_azRtti && classData->m_azRtti->IsTypeOf<ScriptCanvas::PureData>())
if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf<ScriptCanvas::PureData>())
{
continue;
}
// Skip over some of our more dynamic nodes that we want to populate using different means
else if (classData->m_azRtti && classData->m_azRtti->IsTypeOf<ScriptCanvas::Nodes::Core::GetVariableNode>())
else if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf<ScriptCanvas::Nodes::Core::GetVariableNode>())
{
continue;
}
else if (classData->m_azRtti && classData->m_azRtti->IsTypeOf<ScriptCanvas::Nodes::Core::SetVariableNode>())
else if (nodeClassData->m_azRtti && nodeClassData->m_azRtti->IsTypeOf<ScriptCanvas::Nodes::Core::SetVariableNode>())
{
continue;
}
else
{
nodePaletteModel.RegisterCustomNode(categoryPath, node.first, node.second, classData);
nodePaletteModel.RegisterCustomNode(categoryPath, node.first, node.second, nodeClassData);
}
}

@ -563,13 +563,13 @@ namespace ScriptCanvasEditor
else if (slotType == GraphCanvas::SlotTypes::DataSlot)
{
const AZ::EntityId& slotId2 = GetTargetId();
const GraphCanvas::GraphId& graphId = GetGraphId();
const GraphCanvas::GraphId& graphId2 = GetGraphId();
GraphCanvas::Endpoint endpoint;
GraphCanvas::SlotRequestBus::EventResult(endpoint, slotId2, &GraphCanvas::SlotRequests::GetEndpoint);
bool promotedElement = false;
GraphCanvas::GraphModelRequestBus::EventResult(promotedElement, graphId, &GraphCanvas::GraphModelRequests::PromoteToVariableAction, endpoint);
GraphCanvas::GraphModelRequestBus::EventResult(promotedElement, graphId2, &GraphCanvas::GraphModelRequests::PromoteToVariableAction, endpoint);
if (promotedElement)
{

@ -4090,23 +4090,23 @@ namespace ScriptCanvas
auto userFunctionIter = m_userInsThatRequireTopology.find(nodeling);
if (userFunctionIter != m_userInsThatRequireTopology.end())
{
auto& node = *userFunctionIter->first;
auto outSlots = node.GetSlotsByType(CombinedSlotType::ExecutionOut);
auto& userFunctionNode = *userFunctionIter->first;
auto outSlots = userFunctionNode.GetSlotsByType(CombinedSlotType::ExecutionOut);
if (outSlots.empty() || !outSlots.front())
{
AddError(node.GetEntityId(), nullptr, ScriptCanvas::ParseErrors::NoOutSlotInFunctionDefinitionStart);
AddError(userFunctionNode.GetEntityId(), nullptr, ScriptCanvas::ParseErrors::NoOutSlotInFunctionDefinitionStart);
return;
}
if (!ExecutionContainsCyclesCheck(node, *outSlots.front()))
if (!ExecutionContainsCyclesCheck(userFunctionNode, *outSlots.front()))
{
auto definition = userFunctionIter->second;
auto entrySlot = definition->GetId().m_slot;
AZ_Assert(entrySlot, "Bad accounting in user function definition node");
AZStd::vector<VariablePtr> returnValues;
UserOutCallCollector userOutCallCollector;
TraverseExecutionConnections(node, *entrySlot, userOutCallCollector);
TraverseExecutionConnections(userFunctionNode, *entrySlot, userOutCallCollector);
const AZStd::unordered_set<const ScriptCanvas::Nodes::Core::FunctionDefinitionNode*>& uniqueNodelingsOut = userOutCallCollector.GetOutCalls();
for (const auto& returnCall : uniqueNodelingsOut)

@ -121,13 +121,13 @@ namespace ScriptCanvas
{
if (slotId == ExpressionNodeBaseProperty::GetInSlotId(this))
{
for (const SlotId& slotId : m_dirtyInputs)
for (const SlotId& dirtySlotId : m_dirtyInputs)
{
auto variableIter = m_slotToVariableMap.find(slotId);
auto variableIter = m_slotToVariableMap.find(dirtySlotId);
if (variableIter != m_slotToVariableMap.end())
{
PushVariable(variableIter->second, (*FindDatum(slotId)));
PushVariable(variableIter->second, (*FindDatum(dirtySlotId)));
}
}

@ -2060,23 +2060,23 @@ namespace WhiteBox
polygonHandle.m_faceHandles.push_back(faceHandleToVisit);
// for all halfedges
for (const auto halfedgeHandle : faceHalfedges)
for (const auto faceHalfedgeHandle : faceHalfedges)
{
const EdgeHandle edgeHandle = HalfedgeEdgeHandle(whiteBox, halfedgeHandle);
const EdgeHandle edgeHandle = HalfedgeEdgeHandle(whiteBox, faceHalfedgeHandle);
// if we haven't seen this halfedge before and we want to track it,
// store it in visited halfedges
if (halfedgeHandle != oppositeHalfedgeHandle
if (faceHalfedgeHandle != oppositeHalfedgeHandle
// ignore border halfedges (not inside the polygon)
&& AZStd::find(borderHalfedgeHandles.cbegin(), borderHalfedgeHandles.cend(), halfedgeHandle) ==
&& AZStd::find(borderHalfedgeHandles.cbegin(), borderHalfedgeHandles.cend(), faceHalfedgeHandle) ==
borderHalfedgeHandles.cend()
// ensure we do not visit the same halfedge again
&& AZStd::find(visitedHalfedges.cbegin(), visitedHalfedges.cend(), halfedgeHandle) ==
&& AZStd::find(visitedHalfedges.cbegin(), visitedHalfedges.cend(), faceHalfedgeHandle) ==
visitedHalfedges.cend()
// ignore the halfedge if we've already tracked it in our 'building' list
&& AZStd::find(buildingEdgeHandles.cbegin(), buildingEdgeHandles.cend(), edgeHandle) ==
buildingEdgeHandles.cend())
{
halfedgesToVisit.push_back(HalfedgeOppositeHalfedgeHandle(whiteBox, halfedgeHandle));
halfedgesToVisit.push_back(HalfedgeOppositeHalfedgeHandle(whiteBox, faceHalfedgeHandle));
}
}
}
@ -3198,10 +3198,10 @@ namespace WhiteBox
// <missing> - add bottom faces if mesh was 2d previously (reverse winding order)
FaceHandles allFacesToRemove = polygonHandle.m_faceHandles;
for (const auto& polygonHandle : polygonHandlesToRemove)
for (const auto& polygonHandleToRemove : polygonHandlesToRemove)
{
allFacesToRemove.insert(
allFacesToRemove.end(), polygonHandle.m_faceHandles.cbegin(), polygonHandle.m_faceHandles.cend());
allFacesToRemove.end(), polygonHandleToRemove.m_faceHandles.cbegin(), polygonHandleToRemove.m_faceHandles.cend());
}
// remove all faces that were already there

@ -73,7 +73,6 @@ ly_append_configurations_options(
/wd4389 # comparison, signed/unsigned mismatch
/wd4436 # the result of unary operator may be unaligned
/wd4450 # declaration hides global declaration
/wd4457 # declaration hides function parameter
# Enabling warnings that are disabled by default from /W4
# https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default?view=vs-2019

Loading…
Cancel
Save