From 681e25a4f2167d23b78478ffb4a5c720c98d0253 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Tue, 31 Mar 2026 00:54:46 -0700 Subject: [PATCH] fix: clean up unused parameter style in entity_controller Use nameless parameters instead of /*comment*/ syntax for unused args in IObjectTypeHandler interface defaults and overrides. --- include/game/entity_controller.hpp | 7 +++---- src/game/entity_controller.cpp | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/include/game/entity_controller.hpp b/include/game/entity_controller.hpp index 1a8d1f7b..5b220ead 100644 --- a/include/game/entity_controller.hpp +++ b/include/game/entity_controller.hpp @@ -236,10 +236,9 @@ private: // Allows extending object-type handling without modifying handler dispatch. struct IObjectTypeHandler { virtual ~IObjectTypeHandler() = default; - virtual void onCreate(const UpdateBlock& /*block*/, std::shared_ptr& /*entity*/, - bool& /*newItemCreated*/) {} - virtual void onValuesUpdate(const UpdateBlock& /*block*/, std::shared_ptr& /*entity*/) {} - virtual void onMovementUpdate(const UpdateBlock& /*block*/, std::shared_ptr& /*entity*/) {} + virtual void onCreate(const UpdateBlock&, std::shared_ptr&, bool&) {} + virtual void onValuesUpdate(const UpdateBlock&, std::shared_ptr&) {} + virtual void onMovementUpdate(const UpdateBlock&, std::shared_ptr&) {} }; struct UnitTypeHandler; struct PlayerTypeHandler; diff --git a/src/game/entity_controller.cpp b/src/game/entity_controller.cpp index 6a9cc826..361e650d 100644 --- a/src/game/entity_controller.cpp +++ b/src/game/entity_controller.cpp @@ -1266,14 +1266,14 @@ struct EntityController::GameObjectTypeHandler : EntityController::IObjectTypeHa struct EntityController::ItemTypeHandler : EntityController::IObjectTypeHandler { EntityController& ctl_; explicit ItemTypeHandler(EntityController& c) : ctl_(c) {} - void onCreate(const UpdateBlock& block, std::shared_ptr& /*entity*/, bool& newItemCreated) override { ctl_.onCreateItem(block, newItemCreated); } + void onCreate(const UpdateBlock& block, std::shared_ptr&, bool& newItemCreated) override { ctl_.onCreateItem(block, newItemCreated); } void onValuesUpdate(const UpdateBlock& block, std::shared_ptr& entity) override { ctl_.onValuesUpdateItem(block, entity); } }; struct EntityController::CorpseTypeHandler : EntityController::IObjectTypeHandler { EntityController& ctl_; explicit CorpseTypeHandler(EntityController& c) : ctl_(c) {} - void onCreate(const UpdateBlock& block, std::shared_ptr& /*entity*/, bool&) override { ctl_.onCreateCorpse(block); } + void onCreate(const UpdateBlock& block, std::shared_ptr&, bool&) override { ctl_.onCreateCorpse(block); } }; // ============================================================