Ver Fonte

compile fixes for clang on windows

Signed-off-by: Karl Haubenwallner <[email protected]>
Karl Haubenwallner há 2 anos atrás
pai
commit
7ec4e079bb

+ 0 - 5
Code/Editor/Controls/SplineCtrlEx.cpp

@@ -863,8 +863,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
 
         painter->setPen(pen);
 
-        int linesDrawn = 0;
-        int pixels = 0;
 
         float gradient = 0.0f;
         int pointsInLine = -1;
@@ -872,7 +870,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
         QPainterPath path;
         for (int x = left; x <= right; x++)
         {
-            ++pixels;
 
             float time = XOfsToTime(x);
             ISplineInterpolator::ValueType value;
@@ -899,7 +896,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
                 path.lineTo(lineStart);
                 gradient = float(pt.y() - lineStart.y()) / (pt.x() - lineStart.x());
                 pointsInLine = 1;
-                ++linesDrawn;
             }
             else if ((x == right && pointsInLine >= 0) || (pointsInLine > 0 && fabs(lineStart.y() + gradient * (pt.x() - lineStart.x()) - pt.y()) == 1.0f))
             {
@@ -907,7 +903,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
                 path.lineTo(lineStart);
                 gradient = 0.0f;
                 pointsInLine = 0;
-                ++linesDrawn;
             }
             else if (pointsInLine > 0)
             {

+ 1 - 1
Code/Framework/AzCore/AzCore/Memory/dlmalloc.inl

@@ -4074,7 +4074,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped)
     msegmentptr ss = (msegmentptr)(chunk2mem(sp));
     mchunkptr tnext = chunk_plus_offset(sp, ssize);
     mchunkptr p = tnext;
-    int nfences = 0;
+    [[maybe_unused]] int nfences = 0;
 
     /* reset top to new space */
     init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);

+ 2 - 2
Code/Framework/AzCore/AzCore/Metrics/JsonTraceEventLogger.cpp

@@ -510,8 +510,8 @@ namespace AZ::Metrics
         // End the event object
         jsonWriter.EndObject();
 
-        AZ::IO::SizeType totalBytesWritten{};
-        size_t currentEventIndex{};
+        [[maybe_unused]] AZ::IO::SizeType totalBytesWritten{};
+        [[maybe_unused]] size_t currentEventIndex{};
 
         bool result{};
         {

+ 1 - 1
Code/Framework/AzCore/AzCore/RTTI/BehaviorContext.cpp

@@ -87,7 +87,7 @@ namespace AZ
                     azEventDescValid = false;
                 }
 
-                size_t parameterIndex = 0;
+                [[maybe_unused]] size_t parameterIndex = 0;
                 for (AZStd::string_view parameterName : behaviorAzEventDesc.m_parameterNames)
                 {
                     if (parameterName.empty())

+ 3 - 3
Code/Framework/AzCore/AzCore/std/any.h

@@ -193,7 +193,7 @@ namespace AZStd
             m_typeInfo.m_handler(Action::Reserve, this, nullptr);
 
             // Call copy constructor
-            construct<decay_t<ValueType>>(this, forward<ValueType>(val));
+            construct<decay_t<ValueType>>(this, AZStd::forward<ValueType>(val));
         }
 
 
@@ -248,7 +248,7 @@ namespace AZStd
         template <typename ValueType, typename = enable_if_t<!is_same<decay_t<ValueType>, any>::value>>
         any& operator=(ValueType&& val)
         {
-            any(forward<ValueType>(val)).swap(*this);
+            any(AZStd::forward<ValueType>(val)).swap(*this);
             return *this;
         }
 
@@ -289,7 +289,7 @@ namespace AZStd
         template<typename ValueType, typename ParamType> // ParamType must be deduced to allow universal ref
         static void construct(AZStd::any* dest, ParamType&& value, AZStd::enable_if_t<AZStd::is_constructible_v<ValueType, ParamType>, AZStd::true_type*> = nullptr /* AZStd::is_constructible_v<ValueType, ParamType>*/)
         {
-            new (dest->get_data()) ValueType(forward<ParamType>(value));
+            new (dest->get_data()) ValueType(AZStd::forward<ParamType>(value));
         }
 
         // The ValueType is not copy constructible in this case

+ 0 - 2
Code/Framework/AzQtComponents/AzQtComponents/Components/Titlebar.cpp

@@ -760,11 +760,9 @@ namespace AzQtComponents
         else if (canDragWindow())
         {
             QWidget *topLevel = window();
-            auto topLevelWidth = topLevel->width();
             m_dragPos = topLevel->mapFromGlobal(globalPos);
             m_relativeDragPos = (double)m_dragPos.x() / ((double)topLevel->width());
 
-            topLevelWidth++;
         }
         else
         {

BIN
Code/Tools/LuaIDE/Source/Editor/Editor.rc


BIN
Code/Tools/LuaIDE/Source/Editor/LuaEditor.rc


+ 0 - 5
Gems/Atom/RPI/Code/Source/RPI.Builders/Model/ModelExporterComponent.cpp

@@ -160,12 +160,10 @@ namespace AZ
 
                 AZ_Assert(assetInfoResult, "Failed to retrieve source asset info. Can't reason about product asset paths");
 
-                uint32_t lodIndex = 0;
                 for (const Data::Asset<ModelLodAsset>& lodAsset : modelAsset->GetLodAssets())
                 {
                     AZStd::set<uint32_t> exportedSubAssets;
 
-                    uint32_t bufferIndex = 0;
                     for (const ModelLodAsset::Mesh& mesh : lodAsset->GetMeshes())
                     {
                         //Export all BufferAssets for this Lod
@@ -189,7 +187,6 @@ namespace AZ
                                 }
 
                                 exportedSubAssets.insert(indexBufferAsset.GetId().m_subId);
-                                bufferIndex++;
                             }
                         }
 
@@ -213,7 +210,6 @@ namespace AZ
                                 }
 
                                 exportedSubAssets.insert(bufferAsset.GetId().m_subId);
-                                bufferIndex++;
                             }
                         }
                     }
@@ -232,7 +228,6 @@ namespace AZ
                         return SceneAPI::Events::ProcessingResult::Failure;
                     }
 
-                    lodIndex++;
                 } //foreach lodAsset                
 
                 //Export ModelAsset

+ 0 - 2
Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/AttributesWindow.cpp

@@ -823,7 +823,6 @@ namespace EMStudio
         MCore::CommandGroup commandGroup;
         commandGroup.SetGroupName("Pasted transition conditions");
 
-        AZ::u32 numPastedConditions = 0;
         const size_t numConditions = m_copyPasteClipboard.m_conditions.size();
         for (size_t i = 0; i < numConditions; ++i)
         {
@@ -841,7 +840,6 @@ namespace EMStudio
                 m_copyPasteClipboard.m_conditions[i].m_contents);
             commandGroup.AddCommand(addConditionCommand);
 
-            numPastedConditions++;
         }
 
         if (!commandGroup.IsEmpty())

+ 0 - 3
Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/Plugins/StandardPlugins/Source/AnimGraph/BlendGraphWidget.cpp

@@ -1170,7 +1170,6 @@ namespace EMStudio
 
         // Delete all selected connections in the graph view first.
         AZStd::string commandString, sourceNodeName;
-        AZ::u32 numDeletedConnections = 0;
         const AZStd::vector<NodeConnection*> selectedConnections = GetActiveGraph()->GetSelectedNodeConnections();
         for (NodeConnection* selectedConnection : selectedConnections)
         {
@@ -1178,7 +1177,6 @@ namespace EMStudio
             if (emfxTransition)
             {
                 CommandSystem::DeleteStateTransition(&commandGroup, emfxTransition, transitionList);
-                numDeletedConnections++;
             }
             else
             {
@@ -1188,7 +1186,6 @@ namespace EMStudio
                 if (emfxConnection && emfxTargetNode)
                 {
                     CommandSystem::DeleteConnection(&commandGroup, emfxTargetNode, emfxConnection, connectionList);
-                    numDeletedConnections++;
                 }
             }
         }

+ 0 - 6
Gems/LyShine/Code/Editor/Animation/Controls/UiSplineCtrlEx.cpp

@@ -869,16 +869,12 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
 
         painter->setPen(pen);
 
-        int linesDrawn = 0;
-        int pixels = 0;
-
         float gradient = 0.0f;
         int pointsInLine = -1;
         QPoint lineStart;
         QPainterPath path;
         for (int x = left; x <= right; x++)
         {
-            ++pixels;
 
             float time = XOfsToTime(x);
             ISplineInterpolator::ValueType value;
@@ -905,7 +901,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
                 path.lineTo(lineStart);
                 gradient = float(pt.y() - lineStart.y()) / (pt.x() - lineStart.x());
                 pointsInLine = 1;
-                ++linesDrawn;
             }
             else if ((x == right && pointsInLine >= 0) || (pointsInLine > 0 && fabs(lineStart.y() + gradient * (pt.x() - lineStart.x()) - pt.y()) == 1.0f))
             {
@@ -913,7 +908,6 @@ void SplineWidget::DrawSpline(QPainter* painter, SSplineInfo& splineInfo, float
                 path.lineTo(lineStart);
                 gradient = 0.0f;
                 pointsInLine = 0;
-                ++linesDrawn;
             }
             else if (pointsInLine > 0)
             {