Explorar o código

Release build compile fixes.

Signed-off-by: Joerg H. Mueller <[email protected]>
Joerg H. Mueller hai 1 ano
pai
achega
66fd14e877

+ 2 - 2
Gem/Code/Source/Automation/ScriptReporter.cpp

@@ -323,8 +323,8 @@ namespace AtomSampleViewer
 
     const ImageComparisonToleranceLevel* ScriptReporter::FindBestToleranceLevel(float diffScore, bool filterImperceptibleDiffs) const
     {
-        float thresholdChecked = 0.0f;
-        bool ignoringMinorDiffs = false;
+        [[maybe_unused]] float thresholdChecked = 0.0f;
+        [[maybe_unused]] bool ignoringMinorDiffs = false;
         for (const ImageComparisonToleranceLevel& level : m_availableToleranceLevels)
         {
             AZ_Assert(level.m_threshold > thresholdChecked || thresholdChecked == 0.0f, "Threshold values are not sequential");

+ 1 - 1
Gem/Code/Source/RHI/BindlessPrototypeExampleComponent.cpp

@@ -1221,7 +1221,7 @@ namespace AtomSampleViewer
                         // Update the constant data
                         SubMeshInstance& subMesh = m_subMeshInstanceArray[subMeshIdx];
                         // Set the view handle
-                        bool set = subMesh.m_perSubMeshSrg->SetConstant(subMesh.m_viewHandleIndex, m_worldToClipHandle);
+                        [[maybe_unused]] bool set = subMesh.m_perSubMeshSrg->SetConstant(subMesh.m_viewHandleIndex, m_worldToClipHandle);
                         AZ_Assert(set, "Failed to set the view constant");
                         // Set the light handle
                         set = subMesh.m_perSubMeshSrg->SetConstant(subMesh.m_lightHandleIndex, m_lightDirectionHandle);

+ 1 - 1
Gem/Code/Source/RHI/ComputeExampleComponent.cpp

@@ -234,7 +234,7 @@ namespace AtomSampleViewer
         using namespace AZ;
         RHI::Ptr<RHI::Device> device = Utils::GetRHIDevice();
 
-        RHI::ResultCode result = RHI::ResultCode::Success;
+        [[maybe_unused]] RHI::ResultCode result = RHI::ResultCode::Success;
         m_computeBufferPool = RHI::Factory::Get().CreateBufferPool();
 
         RHI::BufferPoolDescriptor bufferPoolDesc;

+ 1 - 1
Gem/Code/Source/RHI/MatrixAlignmentTestExampleComponent.cpp

@@ -142,7 +142,7 @@ namespace AtomSampleViewer
         }
         // Always set the float first, this way if there are alignment issues We'll notice the unexpected
         // colors
-        bool success = false;
+        [[maybe_unused]] bool success = false;
 
         if (m_numFloatsAfterMatrix == 1)
         {

+ 2 - 2
Gem/Code/Source/RHI/QueryExampleComponent.cpp

@@ -113,7 +113,7 @@ namespace AtomSampleViewer
 
         {
             auto scaleMatrix = AZ::Matrix4x4::CreateScale(AZ::Vector3(0.2, 0.2, 0.2));
-            bool success = m_shaderResourceGroups[0]->SetConstant(m_objectMatrixConstantIndex, scaleMatrix * AZ::Matrix4x4::CreateTranslation(AZ::Vector3(0, 0, 0.5)));
+            [[maybe_unused]] bool success = m_shaderResourceGroups[0]->SetConstant(m_objectMatrixConstantIndex, scaleMatrix * AZ::Matrix4x4::CreateTranslation(AZ::Vector3(0, 0, 0.5)));
             success &= m_shaderResourceGroups[0]->SetConstant(m_colorConstantIndex, AZ::Vector4(1.0, 0, 0, 1.0));
             AZ_Warning(QueryExample::SampleName, success, "Failed to set SRG Constant data");
         }
@@ -123,7 +123,7 @@ namespace AtomSampleViewer
                 sinf(m_elapsedTime),
                 0.0f,
                 0.0f);
-            bool success = m_shaderResourceGroups[1]->SetConstant(m_objectMatrixConstantIndex, scaleMatrix * AZ::Matrix4x4::CreateTranslation(translation));
+            [[maybe_unused]] bool success = m_shaderResourceGroups[1]->SetConstant(m_objectMatrixConstantIndex, scaleMatrix * AZ::Matrix4x4::CreateTranslation(translation));
             success &= m_shaderResourceGroups[1]->SetConstant(m_colorConstantIndex, AZ::Color(1.f, 1.f, 1.f, 0.5f).GetAsVector4());
             AZ_Warning(QueryExample::SampleName, success, "Failed to set SRG Constant data");
         }

+ 1 - 1
Gem/Code/Source/SampleComponentManager.cpp

@@ -465,7 +465,7 @@ namespace AtomSampleViewer
         AzFramework::InputChannelEventListener::BusConnect();
         TickBus::Handler::BusConnect();
 
-        bool targetSampleFound = false;
+        [[maybe_unused]] bool targetSampleFound = false;
 
         if (AZStd::string targetSampleName = GetTargetSampleName();
             !targetSampleName.empty())