mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-25 21:03:51 +00:00
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.
This commit is contained in:
parent
11561184e6
commit
681e25a4f2
2 changed files with 5 additions and 6 deletions
|
|
@ -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>& /*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&, std::shared_ptr<Entity>&, bool&) {}
|
||||
virtual void onValuesUpdate(const UpdateBlock&, std::shared_ptr<Entity>&) {}
|
||||
virtual void onMovementUpdate(const UpdateBlock&, std::shared_ptr<Entity>&) {}
|
||||
};
|
||||
struct UnitTypeHandler;
|
||||
struct PlayerTypeHandler;
|
||||
|
|
|
|||
|
|
@ -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>&, 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>&, bool&) override { ctl_.onCreateCorpse(block); }
|
||||
};
|
||||
|
||||
// ============================================================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue