Pārlūkot izejas kodu

Make RHI::GeometryView constructor with one parameter explicit (#19067)

Signed-off-by: Markus Prettner <[email protected]>
Markus Prettner 1 mēnesi atpakaļ
vecāks
revīzija
bbb07e5d28

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp

@@ -27,7 +27,7 @@ namespace AzToolsFramework
             const AZ::EntityId entityId = entityComponentIdPair.GetEntityId();
             AZ_Assert(entityId.IsValid(), "Attempting to create a Component Mode with an invalid EntityId");
 
-            if (const AZ::Entity* entity = AzToolsFramework::GetEntity(entityId))
+            if ([[maybe_unused]] const AZ::Entity* entity = AzToolsFramework::GetEntity(entityId))
             {
                 AZ_Assert(entity->GetState() == AZ::Entity::State::Active,
                     "Attempting to create a Component Mode for an Entity which is not currently active. "

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp

@@ -276,7 +276,7 @@ namespace LegacyFramework
         if (m_applicationEntity)
         {
             // if the component already exists on the system entity, this is an error.
-            if (auto comp = m_ptrSystemEntity->FindComponent(componentCRC))
+            if ([[maybe_unused]] auto comp = m_ptrSystemEntity->FindComponent(componentCRC))
             {
                 AZ_Warning("EditorFramework", 0, "Attempt to add a component that already exists on the system entity: %s\n", comp->RTTI_GetTypeName());
                 return true;

+ 1 - 1
Code/Tools/AssetProcessor/native/utilities/ApplicationManager.cpp

@@ -99,7 +99,7 @@ namespace AssetProcessor
 
         void Activate() override
         {
-            if (auto* registry = AZ::SettingsRegistry::Get())
+            if (AZ::SettingsRegistry::Get())
             {
                 m_verboseMode = AssetUtilities::GetUserSetting(AssetUtilities::VerboseLoggingOptionName, false);
             }

+ 1 - 1
Gems/Atom/RHI/Code/Include/Atom/RHI/GeometryView.h

@@ -37,7 +37,7 @@ namespace AZ::RHI
     public:
         friend class StreamIterator<GeometryView, StreamBufferView>;
 
-        GeometryView(MultiDevice::DeviceMask deviceMask)
+        explicit GeometryView(MultiDevice::DeviceMask deviceMask)
         {
             MultiDeviceObject::IterateDevices(
                 deviceMask,

+ 1 - 1
Gems/Atom/RPI/Code/Source/RPI.Public/Model/ModelLod.cpp

@@ -56,7 +56,7 @@ namespace AZ
 
             for (const ModelLodAsset::Mesh& mesh : lodAsset->GetMeshes())
             {
-                Mesh meshInstance{ RHI::MultiDevice::AllDevices };
+                Mesh meshInstance{ RHI::GeometryView{ RHI::MultiDevice::AllDevices } };
 
                 const BufferAssetView& indexBufferAssetView = mesh.GetIndexBufferAssetView();
                 const Data::Asset<BufferAsset>& indexBufferAsset = indexBufferAssetView.GetBufferAsset();