From c5f0ca6d622ef7361597d59bc5fbadbc799389c2 Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Sun, 8 Dec 2013 21:08:58 +0100 Subject: deleted copy constructors in Component rather than all the subclasses --- src/game-server/being.h | 3 --- src/game-server/charactercomponent.h | 3 --- src/game-server/component.h | 19 +++++++++++-------- src/game-server/mapcomposite.h | 2 -- 4 files changed, 11 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/game-server/being.h b/src/game-server/being.h index de9219a5..a29ae747 100644 --- a/src/game-server/being.h +++ b/src/game-server/being.h @@ -298,9 +298,6 @@ class BeingComponent : public Component BeingGender mGender; /**< Gender of the being. */ private: - BeingComponent(const BeingComponent &rhs) = delete; - BeingComponent &operator=(const BeingComponent &rhs) = delete; - /** * Connected to signal_inserted to reset the old position. */ diff --git a/src/game-server/charactercomponent.h b/src/game-server/charactercomponent.h index 13fa4f95..e62fb396 100644 --- a/src/game-server/charactercomponent.h +++ b/src/game-server/charactercomponent.h @@ -318,9 +318,6 @@ class CharacterComponent : public Component private: void deserialize(Entity &entity, MessageIn &msg); - CharacterComponent(const CharacterComponent &) = delete; - CharacterComponent &operator=(const CharacterComponent &) = delete; - void abilityStatusChanged(int id); void abilityCooldownActivated(); diff --git a/src/game-server/component.h b/src/game-server/component.h index 0a239652..9d2c5582 100644 --- a/src/game-server/component.h +++ b/src/game-server/component.h @@ -47,14 +47,17 @@ enum ComponentType */ class Component : public sigc::trackable { - public: - virtual ~Component() {} - - /** - * Updates the internal status. The \a entity is the owner of this - * component. - */ - virtual void update(Entity &entity) = 0; +public: + Component() {} + Component(const Component &rhs) = delete; + Component &operator=(const Component &rhs) = delete; + virtual ~Component() {} + + /** + * Updates the internal status. The \a entity is the owner of this + * component. + */ + virtual void update(Entity &entity) = 0; }; #endif // COMPONENT_H diff --git a/src/game-server/mapcomposite.h b/src/game-server/mapcomposite.h index 212d4529..effed26a 100644 --- a/src/game-server/mapcomposite.h +++ b/src/game-server/mapcomposite.h @@ -132,8 +132,6 @@ class MapComposite { public: MapComposite(int id, const std::string &name); - MapComposite(const MapComposite &) = delete; - ~MapComposite(); bool readMap(); -- cgit v1.2.3-70-g09d2