Skip to content

Commit 95d437d

Browse files
committed
Fix unused variable warnings
1 parent 3e135cd commit 95d437d

13 files changed

+29
-29
lines changed

Gem/Source/Components/BeamComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ void BeamComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArray
7272
io_required.push_back(AZ_CRC_CE("PhysicsRigidBodyService"));
7373
}
7474

75-
void BeamComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
75+
void BeamComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
7676
{}
7777

7878
void BeamComponent::Init()

Gem/Source/Components/CollectableComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ void CollectableComponent::GetRequiredServices(AZ::ComponentDescriptor::Dependen
7171
io_required.push_back(AZ_CRC_CE("PhysicsRigidBodyService"));
7272
}
7373

74-
void CollectableComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
74+
void CollectableComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
7575
{}
7676

7777
void CollectableComponent::Init()
7878
{
79-
m_triggerEnterHandler = AzPhysics::SimulatedBodyEvents::OnTriggerEnter::Handler([this]([[maybe_unused]] AzPhysics::SimulatedBodyHandle i_bodyHandle, const AzPhysics::TriggerEvent& i_trigger)
79+
m_triggerEnterHandler = AzPhysics::SimulatedBodyEvents::OnTriggerEnter::Handler([this]([[maybe_unused]] AzPhysics::SimulatedBodyHandle i_bodyHandle, [[maybe_unused]] const AzPhysics::TriggerEvent& i_trigger)
8080
{
8181
switch(m_type)
8282
{

Gem/Source/Components/CollectablesPoolComponent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,10 @@ void CollectablesPoolComponent::GetIncompatibleServices(AZ::ComponentDescriptor:
104104
io_incompatible.push_back(AZ_CRC_CE("CollectablesPoolService"));
105105
}
106106

107-
void CollectablesPoolComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& io_required)
107+
void CollectablesPoolComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_required)
108108
{}
109109

110-
void CollectablesPoolComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
110+
void CollectablesPoolComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
111111
{}
112112

113113
void CollectablesPoolComponent::Init()
@@ -188,7 +188,7 @@ void CollectablesPoolComponent::TryCreateCollectable(const AZ::EntityId& i_tileE
188188
newCollectable->m_timer = GenerateRandomInRange(m_minCollectableExpiration, m_maxCollectableExpiration);
189189
};
190190

191-
spawnOptions.m_completionCallback = [this, i_tileEntityId](AzFramework::EntitySpawnTicket::Id i_spawnTicketId, AzFramework::SpawnableConstEntityContainerView i_newEntities)
191+
spawnOptions.m_completionCallback = [this, i_tileEntityId]([[maybe_unused]] AzFramework::EntitySpawnTicket::Id i_spawnTicketId, AzFramework::SpawnableConstEntityContainerView i_newEntities)
192192
{
193193
if(i_newEntities.empty())
194194
{

Gem/Source/Components/ScoreComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ void ScoreComponent::GetIncompatibleServices(AZ::ComponentDescriptor::Dependency
6060
io_incompatible.push_back(AZ_CRC_CE("ScoreService"));
6161
}
6262

63-
void ScoreComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& io_required)
63+
void ScoreComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_required)
6464
{}
6565

66-
void ScoreComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
66+
void ScoreComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
6767
{}
6868

6969
void ScoreComponent::Activate()

Gem/Source/Components/SpaceshipComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void SpaceshipComponent::GetRequiredServices(AZ::ComponentDescriptor::Dependency
108108
io_required.push_back(AZ_CRC_CE("TransformService"));
109109
}
110110

111-
void SpaceshipComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
111+
void SpaceshipComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
112112
{}
113113

114114
void SpaceshipComponent::Init()

Gem/Source/Components/StormsPoolComponent.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ void StormsPoolComponent::GetIncompatibleServices(AZ::ComponentDescriptor::Depen
9797
io_incompatible.push_back(AZ_CRC_CE("StormsPoolService"));
9898
}
9999

100-
void StormsPoolComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& io_required)
100+
void StormsPoolComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_required)
101101
{}
102102

103-
void StormsPoolComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
103+
void StormsPoolComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
104104
{}
105105

106106
void StormsPoolComponent::Init()
@@ -193,7 +193,7 @@ void StormsPoolComponent::CreateStorm()
193193
newStorm->m_moveSpeed = GenerateRandomInRange(m_minStormSpeed, m_maxStormSpeed);
194194
};
195195

196-
spawnOptions.m_completionCallback = [this](AzFramework::EntitySpawnTicket::Id i_spawnTicketId, AzFramework::SpawnableConstEntityContainerView i_newEntities)
196+
spawnOptions.m_completionCallback = [this]([[maybe_unused]] AzFramework::EntitySpawnTicket::Id i_spawnTicketId, AzFramework::SpawnableConstEntityContainerView i_newEntities)
197197
{
198198
if(i_newEntities.empty())
199199
{

Gem/Source/Components/TileComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ void TileComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArray
9595
io_required.push_back(AZ_CRC_CE("TransformService"));
9696
}
9797

98-
void TileComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
98+
void TileComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
9999
{}
100100

101101
void TileComponent::Activate()

Gem/Source/Components/TilesPoolComponent.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ void TilesPoolComponent::GetIncompatibleServices(AZ::ComponentDescriptor::Depend
9494
io_incompatible.push_back(AZ_CRC_CE("TilesPoolService"));
9595
}
9696

97-
void TilesPoolComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& io_required)
97+
void TilesPoolComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_required)
9898
{}
9999

100-
void TilesPoolComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
100+
void TilesPoolComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
101101
{}
102102

103103
void TilesPoolComponent::Init()

Gem/Source/Components/UiComponent.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ void UiComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayTy
8585
io_required.push_back(AZ_CRC("UiCanvasRefService", 0xb4cb5ef4));
8686
}
8787

88-
void UiComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
88+
void UiComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& io_dependent)
8989
{}
9090

9191
void UiComponent::Activate()

Gem/Source/EBuses/CollectableBus.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ namespace Loherangrin::Games::O3DEJam2305
2929
AZ_RTTI(CollectablesNotifications, "{580578F6-150A-4A30-8A22-C799B336B52A}");
3030
virtual ~CollectablesNotifications() = default;
3131

32-
virtual void OnStopDecayCollected(float i_duration){}
33-
virtual void OnSpaceshipEnergyCollected(float i_energy){}
34-
virtual void OnTileEnergyCollected(float i_energy){}
35-
virtual void OnPointsCollected(Points i_points){}
36-
virtual void OnSpeedCollected(float i_multiplier, float i_duration){}
32+
virtual void OnStopDecayCollected([[maybe_unused]] float i_duration){}
33+
virtual void OnSpaceshipEnergyCollected([[maybe_unused]] float i_energy){}
34+
virtual void OnTileEnergyCollected([[maybe_unused]] float i_energy){}
35+
virtual void OnPointsCollected([[maybe_unused]] Points i_points){}
36+
virtual void OnSpeedCollected([[maybe_unused]] float i_multiplier, [[maybe_unused]] float i_duration){}
3737
};
3838

3939
class CollectablesNotificationBusTraits

0 commit comments

Comments
 (0)