Browse Source

Fixes for compile issue in the release config

Signed-off-by: rgba16f <[email protected]>
rgba16f 3 years ago
parent
commit
edc2dae470

+ 3 - 1
Gem/Code/Source/Automation/ScriptManager.cpp

@@ -1141,14 +1141,16 @@ namespace AtomSampleViewer
         s_instance->m_scriptOperations.push(AZStd::move(func));
     }
 
-    void ScriptManager::Script_Print(const AZStd::string& message)
+    void ScriptManager::Script_Print(const AZStd::string& message [[maybe_unused]])
     {
+#ifndef RELEASE // AZ_TracePrintf is a no-op in release builds
         auto func = [message]()
         {
             AZ_TracePrintf("Automation", "Script: %s\n", message.c_str());
         };
 
         s_instance->m_scriptOperations.push(AZStd::move(func));
+#endif
     }
 
     AZStd::string ScriptManager::Script_ResolvePath(const AZStd::string& path)

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

@@ -318,7 +318,7 @@ namespace AtomSampleViewer
     uint32_t ShaderReloadTestComponent::ReadPixel(const uint8_t* rawRGBAPixelData, const AZ::RHI::ImageDescriptor& imageDescriptor, uint32_t x, uint32_t y) const
     {
         const auto width = imageDescriptor.m_size.m_width;
-        const auto height = imageDescriptor.m_size.m_height;
+        [[maybe_unused]] const auto height = imageDescriptor.m_size.m_height;
         AZ_Assert((x < width) && (y < height), "Invalid read pixel location (x, y)=(%u, %u) for width=%u, height=%u", x, y, width, height);
         auto tmp = reinterpret_cast<const uint32_t *>(rawRGBAPixelData);
         const uint32_t pixelColor = tmp[ (width * y) + x];