diff options
author | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-01-29 21:50:36 +0100 |
---|---|---|
committer | Erik Schilling <ablu.erikschilling@googlemail.com> | 2013-01-29 21:50:36 +0100 |
commit | 5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a (patch) | |
tree | 2c48286401387ed2f50680d729f927bc9c0812ef /src | |
parent | b1c1bff1153a86bd695287fbf3bfdf67dee3c819 (diff) | |
download | manaserv-5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a.tar.gz manaserv-5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a.tar.bz2 manaserv-5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a.tar.xz manaserv-5c7bf62ca3204c6f8b91f1bd9178cb638e184f5a.zip |
Silenced some eclipse warnings
Diffstat (limited to 'src')
-rw-r--r-- | src/account-server/serverhandler.cpp | 4 | ||||
-rw-r--r-- | src/game-server/attribute.h | 6 | ||||
-rw-r--r-- | src/game-server/being.cpp | 1 | ||||
-rw-r--r-- | src/game-server/command.cpp | 2 | ||||
-rw-r--r-- | src/game-server/gamehandler.cpp | 1 | ||||
-rw-r--r-- | src/game-server/map.cpp | 6 | ||||
-rw-r--r-- | src/game-server/mapcomposite.cpp | 3 | ||||
-rw-r--r-- | src/game-server/state.cpp | 3 |
8 files changed, 21 insertions, 5 deletions
diff --git a/src/account-server/serverhandler.cpp b/src/account-server/serverhandler.cpp index abdb5756..04fd1e23 100644 --- a/src/account-server/serverhandler.cpp +++ b/src/account-server/serverhandler.cpp @@ -57,7 +57,7 @@ typedef std::map<unsigned short, MapStatistics> ServerStatistics; */ struct GameServer: NetComputer { - GameServer(ENetPeer *peer): NetComputer(peer), port(0) {} + GameServer(ENetPeer *peer): NetComputer(peer), server(0), port(0) {} std::string address; NetComputer *server; @@ -708,7 +708,7 @@ void GameServerHandler::syncDatabase(MessageIn &msg) int charId = msg.readInt32(); bool online = (msg.readInt8() == 1); storage->setOnlineStatus(charId, online); - } + } break; } } diff --git a/src/game-server/attribute.h b/src/game-server/attribute.h index 8c8d3b8e..82303ff8 100644 --- a/src/game-server/attribute.h +++ b/src/game-server/attribute.h @@ -132,7 +132,11 @@ class AttributeModifiersEffect class Attribute { public: - Attribute() {throw;} // DEBUG; Find improper constructions + Attribute() + : mBase(0) + , mMaxValue(0) + , mMinValue(0) + {throw;} // DEBUG; Find improper constructions Attribute(const AttributeManager::AttributeInfo &info); diff --git a/src/game-server/being.cpp b/src/game-server/being.cpp index 9ce19d76..0e240870 100644 --- a/src/game-server/being.cpp +++ b/src/game-server/being.cpp @@ -113,6 +113,7 @@ int Being::damage(Actor * /* source */, const Damage &damage) "implemented yet and should not be used!"); HPloss = 0; #endif + break; case DAMAGE_DIRECT: break; default: diff --git a/src/game-server/command.cpp b/src/game-server/command.cpp index 5e87f9f6..e80b9f98 100644 --- a/src/game-server/command.cpp +++ b/src/game-server/command.cpp @@ -256,7 +256,7 @@ static void ban(Character *from, Character *ch, const std::string &duration) switch (duration[duration.length() - 1]) { case 'd': d = d * 24; // nobreak - case 'h': d = d * 60; + case 'h': d = d * 60; break; } accountHandler->banCharacter(ch, d); } diff --git a/src/game-server/gamehandler.cpp b/src/game-server/gamehandler.cpp index 114e65b7..18059d6e 100644 --- a/src/game-server/gamehandler.cpp +++ b/src/game-server/gamehandler.cpp @@ -464,6 +464,7 @@ void GameHandler::handleNpc(GameClient &client, MessageIn &message) case PGMSG_NPC_TALK_NEXT: default: npc->prompt(client.character, message.getId() == PGMSG_NPC_TALK); + break; } } diff --git a/src/game-server/map.cpp b/src/game-server/map.cpp index e372f03d..b4e66e02 100644 --- a/src/game-server/map.cpp +++ b/src/game-server/map.cpp @@ -35,7 +35,11 @@ class PathInfo { public: PathInfo() - : whichList(0) + : Gcost(0) + , Hcost(0) + , whichList(0) + , parentX(0) + , parentY(0) {} int Gcost; /**< Cost from start to this location */ diff --git a/src/game-server/mapcomposite.cpp b/src/game-server/mapcomposite.cpp index cdea12a8..485492db 100644 --- a/src/game-server/mapcomposite.cpp +++ b/src/game-server/mapcomposite.cpp @@ -92,6 +92,7 @@ void MapZone::insert(Actor *obj) default: { objects.push_back(obj); + break; } } } @@ -117,6 +118,7 @@ void MapZone::remove(Actor *obj) { i = objects.begin() + nbMovingObjects; i_end = objects.end(); + break; } } i = std::find(i, i_end, obj); @@ -462,6 +464,7 @@ Script::Ref MapComposite::mUpdateCallback; MapComposite::MapComposite(int id, const std::string &name): mActive(false), mMap(0), + mPvPRules(PVP_NONE), mContent(0), mName(name), mID(id) diff --git a/src/game-server/state.cpp b/src/game-server/state.cpp index a688caca..006075b4 100644 --- a/src/game-server/state.cpp +++ b/src/game-server/state.cpp @@ -269,6 +269,7 @@ static void informPlayer(MapComposite *map, Character *p) default: assert(false); // TODO + break; } gameHandler->sendTo(p, enterMsg); } @@ -556,6 +557,7 @@ bool GameState::insert(Entity *ptr) case OBJECT_OTHER: default: LOG_DEBUG("Entity inserted: " << obj->getType()); + break; } obj->raiseUpdateFlags(UPDATEFLAG_NEW_ON_MAP); @@ -629,6 +631,7 @@ void GameState::remove(Entity *ptr) case OBJECT_OTHER: default: LOG_DEBUG("Entity removed: " << ptr->getType()); + break; } if (ptr->canMove()) |