Browse Source

[RHI][Android] Fix un-used variable compile warning. (#266)

* [RHI][Android] Fix un-used variable compile warning.

Signed-off-by: Peng <[email protected]>

* fix space

Signed-off-by: Peng <[email protected]>

* Fix another un-used variable.

Signed-off-by: Peng <[email protected]>
AMZN-tpeng 3 years ago
parent
commit
a9ecbc0302

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

@@ -549,8 +549,8 @@ namespace AtomSampleViewer
         // Validate the compatibility of the image sub resources
         for (uint32_t i = 1; i < imageSubresourceLayouts.size(); i++)
         {
-            const bool compatibleFormat = imageDescriptors[0].m_format == imageDescriptors[i].m_format;
-            const bool compatibleLayout = imageSubresourceLayouts[0].m_size == imageSubresourceLayouts[i].m_size &&
+            [[maybe_unused]] const bool compatibleFormat = imageDescriptors[0].m_format == imageDescriptors[i].m_format;
+            [[maybe_unused]] const bool compatibleLayout = imageSubresourceLayouts[0].m_size == imageSubresourceLayouts[i].m_size &&
                 imageSubresourceLayouts[0].m_rowCount == imageSubresourceLayouts[i].m_rowCount &&
                 imageSubresourceLayouts[0].m_bytesPerRow == imageSubresourceLayouts[i].m_bytesPerRow &&
                 imageSubresourceLayouts[0].m_bytesPerImage == imageSubresourceLayouts[i].m_bytesPerImage;

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

@@ -287,7 +287,7 @@ namespace AtomSampleViewer
             {
                 for (int32_t heightIdx = 0; heightIdx < m_objectCountDepth; heightIdx++)
                 {
-                    const int32_t objectCount = widthIdx * depthIdx * heightIdx;
+                    [[maybe_unused]] const int32_t objectCount = widthIdx * depthIdx * heightIdx;
                     AZ_Assert(static_cast<uint32_t>(objectCount) < m_objectCount, "Spawning too many objects");
 
                     // Calculate the object position