From 9134263ca185a34726cb4cd2f9ee4849f9354674 Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Fri, 12 Apr 2013 15:05:31 +0200 Subject: Removed static member definitions that are no longer needed The requirement for having these definitions was relaxed in the C++11 standard. In short, they are not needed anymore for static const integral types. Details: http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_defects.html#454 --- src/game-server/effect.cpp | 2 -- src/game-server/item.cpp | 2 -- src/game-server/monster.h | 2 +- src/game-server/npc.cpp | 2 -- src/game-server/spawnareacomponent.cpp | 2 -- src/game-server/triggerareacomponent.cpp | 2 -- 6 files changed, 1 insertion(+), 11 deletions(-) (limited to 'src') diff --git a/src/game-server/effect.cpp b/src/game-server/effect.cpp index 94f4613..42142c5 100644 --- a/src/game-server/effect.cpp +++ b/src/game-server/effect.cpp @@ -25,8 +25,6 @@ #include "game-server/entity.h" #include "game-server/state.h" -const ComponentType EffectComponent::type; - void EffectComponent::update(Entity &entity) { if (mHasBeenShown) diff --git a/src/game-server/item.cpp b/src/game-server/item.cpp index ed74e92..444576f 100644 --- a/src/game-server/item.cpp +++ b/src/game-server/item.cpp @@ -156,8 +156,6 @@ void ItemClass::addAttack(AttackInfo *attackInfo, addEffect(new ItemEffectAttack(attackInfo), applyTrigger, dispellTrigger); } -const ComponentType ItemComponent::type; - ItemComponent::ItemComponent(ItemClass *type, int amount) : mType(type), mAmount(amount) diff --git a/src/game-server/monster.h b/src/game-server/monster.h index d28ec57..2e23820 100644 --- a/src/game-server/monster.h +++ b/src/game-server/monster.h @@ -275,7 +275,7 @@ struct AttackPosition class MonsterComponent : public Component { public: - static const ComponentType type = CT_Monster; + static const ComponentType type = CT_Monster; /** Time in game ticks until ownership of a monster can change. */ static const int KILLSTEAL_PROTECTION_TIME = 100; diff --git a/src/game-server/npc.cpp b/src/game-server/npc.cpp index 7806e51..b5e17ea 100644 --- a/src/game-server/npc.cpp +++ b/src/game-server/npc.cpp @@ -28,8 +28,6 @@ #include "scripting/script.h" #include "scripting/scriptmanager.h" -const ComponentType NpcComponent::type; - NpcComponent::NpcComponent(int npcId): mNpcId(npcId), mEnabled(true) diff --git a/src/game-server/spawnareacomponent.cpp b/src/game-server/spawnareacomponent.cpp index afc8666..54cb017 100644 --- a/src/game-server/spawnareacomponent.cpp +++ b/src/game-server/spawnareacomponent.cpp @@ -25,8 +25,6 @@ #include "game-server/state.h" #include "utils/logger.h" -const ComponentType SpawnAreaComponent::type; - SpawnAreaComponent::SpawnAreaComponent(MonsterClass *specy, const Rectangle &zone, int maxBeings, diff --git a/src/game-server/triggerareacomponent.cpp b/src/game-server/triggerareacomponent.cpp index e935490..b599546 100644 --- a/src/game-server/triggerareacomponent.cpp +++ b/src/game-server/triggerareacomponent.cpp @@ -57,8 +57,6 @@ void ScriptAction::process(Entity *obj) mScript->execute(obj->getMap()); } -const ComponentType TriggerAreaComponent::type; - void TriggerAreaComponent::update(Entity &entity) { MapComposite *map = entity.getMap(); -- cgit