From f05ca0897e0a180123ebb172a5d7bf23ad8eeda1 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Sat, 15 Jan 2022 14:26:58 -0800 Subject: [PATCH] Fix some warnings and remove an unused function parameter Signed-off-by: amzn-sj --- .../Source/Components/TerrainPhysicsColliderComponent.cpp | 2 +- .../Source/Components/TerrainWorldDebuggerComponent.cpp | 6 +++--- .../Code/Source/Components/TerrainWorldDebuggerComponent.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp index 4a8b4680b3..c74a478dad 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainPhysicsColliderComponent.cpp @@ -344,7 +344,7 @@ namespace Terrain AZStd::vector materialList = GetMaterialList(); auto perPositionCallback = [&heightMaterials, &materialList, this, worldCenterZ, worldHeightBoundsMin, worldHeightBoundsMax] - (size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, bool terrainExists) + ([[maybe_unused]] size_t xIndex, [[maybe_unused]] size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, bool terrainExists) { float height = surfacePoint.m_position.GetZ(); diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp index 46be621307..f684727d33 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.cpp @@ -297,7 +297,7 @@ namespace Terrain { if (sector.m_isDirty) { - RebuildSectorWireframe(sector, heightDataResolution, worldMinZ); + RebuildSectorWireframe(sector, heightDataResolution); } if (!sector.m_lineVertices.empty()) @@ -317,7 +317,7 @@ namespace Terrain } - void TerrainWorldDebuggerComponent::RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution, float worldMinZ) + void TerrainWorldDebuggerComponent::RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution) { if (!sector.m_isDirty) { @@ -354,7 +354,7 @@ namespace Terrain // For each terrain height value in the region, create the _| grid lines for that point and cache off the height value // for use with subsequent grid line calculations. auto ProcessHeightValue = [gridResolution, &previousHeight, &rowHeights, §or] - (uint32_t xIndex, uint32_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) + (size_t xIndex, size_t yIndex, const AzFramework::SurfaceData::SurfacePoint& surfacePoint, [[maybe_unused]] bool terrainExists) { // Don't add any vertices for the first column or first row. These grid lines will be handled by an adjacent sector, if // there is one. diff --git a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h index f3bcead8c3..cb308effe6 100644 --- a/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h +++ b/Gems/Terrain/Code/Source/Components/TerrainWorldDebuggerComponent.h @@ -93,7 +93,7 @@ namespace Terrain bool m_isDirty{ true }; }; - void RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution, float worldMinZ); + void RebuildSectorWireframe(WireframeSector& sector, const AZ::Vector2& gridResolution); void MarkDirtySectors(const AZ::Aabb& dirtyRegion); void DrawWorldBounds(AzFramework::DebugDisplayRequests& debugDisplay); void DrawWireframe(const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay);