fix: silence all -Wunused-parameter warnings in entity_controller

Suppress 9 unused parameter warnings in IObjectTypeHandler interface
methods and their overrides by commenting out parameter names:
- Base class: onCreate/onValuesUpdate/onMovementUpdate default empty
  implementations (parameters intentionally unused in base)
- ItemTypeHandler::onCreate: entity param forwarded only to onCreateItem
  which doesn't need it
- CorpseTypeHandler::onCreate: entity param not needed for corpse spawn

Build now produces zero warnings (excluding third-party stb headers).
This commit is contained in:
Kelsi 2026-03-31 00:48:03 -07:00
parent 32bb0becc8
commit 11561184e6
2 changed files with 6 additions and 6 deletions

View file

@ -236,10 +236,10 @@ 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>& entity,
bool& newItemCreated) {}
virtual void onValuesUpdate(const UpdateBlock& block, std::shared_ptr<Entity>& entity) {}
virtual void onMovementUpdate(const UpdateBlock& block, std::shared_ptr<Entity>& entity) {}
virtual void onCreate(const UpdateBlock& /*block*/, std::shared_ptr<Entity>& /*entity*/,
bool& /*newItemCreated*/) {}
virtual void onValuesUpdate(const UpdateBlock& /*block*/, std::shared_ptr<Entity>& /*entity*/) {}
virtual void onMovementUpdate(const UpdateBlock& /*block*/, std::shared_ptr<Entity>& /*entity*/) {}
};
struct UnitTypeHandler;
struct PlayerTypeHandler;

View file

@ -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>& entity, bool& newItemCreated) override { ctl_.onCreateItem(block, newItemCreated); }
void onCreate(const UpdateBlock& block, std::shared_ptr<Entity>& /*entity*/, bool& newItemCreated) override { ctl_.onCreateItem(block, newItemCreated); }
void onValuesUpdate(const UpdateBlock& block, std::shared_ptr<Entity>& 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>& entity, bool&) override { ctl_.onCreateCorpse(block); }
void onCreate(const UpdateBlock& block, std::shared_ptr<Entity>& /*entity*/, bool&) override { ctl_.onCreateCorpse(block); }
};
// ============================================================