diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-08 00:44:17 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-08 00:44:17 +0300 |
commit | 4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe (patch) | |
tree | 714897eca03fbcb764f5b450a29cc1aef8d33433 /src/net/ea | |
parent | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (diff) | |
download | manaverse-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.gz manaverse-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.bz2 manaverse-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.tar.xz manaverse-4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe.zip |
Fix more gcc 4.7 warnings.
Diffstat (limited to 'src/net/ea')
-rw-r--r-- | src/net/ea/beinghandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/buysellhandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/charserverhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/ea/guildhandler.cpp | 12 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.cpp | 24 | ||||
-rw-r--r-- | src/net/ea/inventoryhandler.h | 2 | ||||
-rw-r--r-- | src/net/ea/npchandler.cpp | 2 | ||||
-rw-r--r-- | src/net/ea/partyhandler.cpp | 20 | ||||
-rw-r--r-- | src/net/ea/tradehandler.cpp | 6 |
9 files changed, 38 insertions, 38 deletions
diff --git a/src/net/ea/beinghandler.cpp b/src/net/ea/beinghandler.cpp index 8fca76353..5c3c694b3 100644 --- a/src/net/ea/beinghandler.cpp +++ b/src/net/ea/beinghandler.cpp @@ -67,7 +67,7 @@ BeingHandler::BeingHandler(bool enableSync) : Being *BeingHandler::createBeing(int id, short job) { if (!actorSpriteManager) - return 0; + return nullptr; ActorSprite::Type type = ActorSprite::UNKNOWN; if (job <= 25 || (job >= 4001 && job <= 4049)) @@ -143,7 +143,7 @@ void BeingHandler::processBeingVisibleOrMove(Net::MessageIn &msg, bool visible) { actorSpriteManager->destroy(dstBeing); actorSpriteManager->erase(dstBeing); - dstBeing = 0; + dstBeing = nullptr; } if (!dstBeing) diff --git a/src/net/ea/buysellhandler.cpp b/src/net/ea/buysellhandler.cpp index f38d17a59..28584d97f 100644 --- a/src/net/ea/buysellhandler.cpp +++ b/src/net/ea/buysellhandler.cpp @@ -51,7 +51,7 @@ namespace Ea BuySellHandler::BuySellHandler() : mNpcId(0), - mBuyDialog(0) + mBuyDialog(nullptr) { } diff --git a/src/net/ea/charserverhandler.cpp b/src/net/ea/charserverhandler.cpp index 08c9a43c8..0c01959f2 100644 --- a/src/net/ea/charserverhandler.cpp +++ b/src/net/ea/charserverhandler.cpp @@ -124,7 +124,7 @@ void CharServerHandler::processCharCreate(Net::MessageIn &msg, bool withColors) if (mCharCreateDialog) { mCharCreateDialog->scheduleDelete(); - mCharCreateDialog = 0; + mCharCreateDialog = nullptr; } } @@ -160,7 +160,7 @@ void CharServerHandler::processCharDelete(Net::MessageIn &msg A_UNUSED) { delete mSelectedCharacter; mCharacters.remove(mSelectedCharacter); - mSelectedCharacter = 0; + mSelectedCharacter = nullptr; updateCharSelectDialog(); unlockCharSelectDialog(); new OkDialog(_("Info"), _("Character deleted.")); diff --git a/src/net/ea/guildhandler.cpp b/src/net/ea/guildhandler.cpp index 66488d5fb..907fa13db 100644 --- a/src/net/ea/guildhandler.cpp +++ b/src/net/ea/guildhandler.cpp @@ -35,8 +35,8 @@ namespace Ea { -GuildTab *guildTab = 0; -Guild *taGuild = 0; +GuildTab *guildTab = nullptr; +Guild *taGuild = nullptr; GuildHandler::GuildHandler() : showBasicInfo(false) @@ -46,7 +46,7 @@ GuildHandler::GuildHandler() : GuildHandler::~GuildHandler() { delete guildTab; - guildTab = 0; + guildTab = nullptr; } void GuildHandler::requestAlliance(int guildId A_UNUSED, @@ -450,7 +450,7 @@ void GuildHandler::processGuildLeave(Net::MessageIn &msg) } SERVER_NOTICE(_("You have left the guild.")) delete guildTab; - guildTab = 0; + guildTab = nullptr; if (socialWindow && taGuild) socialWindow->removeTab(taGuild); @@ -497,7 +497,7 @@ void GuildHandler::processGuildExpulsion(Net::MessageIn &msg) } SERVER_NOTICE(_("You was kicked from guild.")); delete guildTab; - guildTab = 0; + guildTab = nullptr; if (socialWindow && taGuild) socialWindow->removeTab(taGuild); @@ -607,7 +607,7 @@ void GuildHandler::processGuildBroken(Net::MessageIn &msg) void GuildHandler::clear() { - taGuild = 0; + taGuild = nullptr; } } // namespace Ea diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 788b7f0fc..d2a1fb4f0 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -78,8 +78,8 @@ namespace Ea InventoryHandler::InventoryHandler() { - mStorage = 0; - mStorageWindow = 0; + mStorage = nullptr; + mStorageWindow = nullptr; mDebugInventory = true; } @@ -88,11 +88,11 @@ InventoryHandler::~InventoryHandler() if (mStorageWindow) { mStorageWindow->close(); - mStorageWindow = 0; + mStorageWindow = nullptr; } delete mStorage; - mStorage = 0; + mStorage = nullptr; } bool InventoryHandler::canSplit(const Item *item A_UNUSED) const @@ -164,7 +164,7 @@ void InventoryHandler::processPlayerInventory(Net::MessageIn &msg, int index, amount, itemId, arrow; int cards[4], itemType; unsigned char identified; - Inventory *inventory = 0; + Inventory *inventory = nullptr; if (player_node) inventory = PlayerInfo::getInventory(); @@ -279,7 +279,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) unsigned char identified; int floorId; - Inventory *inventory = 0; + Inventory *inventory = nullptr; if (player_node) inventory = PlayerInfo::getInventory(); @@ -345,7 +345,7 @@ void InventoryHandler::processPlayerInventoryAdd(Net::MessageIn &msg) void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) { int index, amount; - Inventory *inventory = 0; + Inventory *inventory = nullptr; if (player_node) inventory = PlayerInfo::getInventory(); @@ -367,7 +367,7 @@ void InventoryHandler::processPlayerInventoryRemove(Net::MessageIn &msg) void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) { int index, amount; - Inventory *inventory = 0; + Inventory *inventory = nullptr; if (player_node) inventory = PlayerInfo::getInventory(); @@ -392,7 +392,7 @@ void InventoryHandler::processPlayerInventoryUse(Net::MessageIn &msg) void InventoryHandler::processItemUseResponse(Net::MessageIn &msg) { int index, amount; - Inventory *inventory = 0; + Inventory *inventory = nullptr; if (player_node) inventory = PlayerInfo::getInventory(); @@ -499,13 +499,13 @@ void InventoryHandler::processPlayerStorageClose(Net::MessageIn &msg A_UNUSED) { // Storage access has been closed // Storage window deletes itself - mStorageWindow = 0; + mStorageWindow = nullptr; if (mStorage) mStorage->clear(); delete mStorage; - mStorage = 0; + mStorage = nullptr; } void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) @@ -514,7 +514,7 @@ void InventoryHandler::processPlayerEquipment(Net::MessageIn &msg) int number; unsigned char identified; - Inventory *inventory = 0; + Inventory *inventory = nullptr; if (player_node) inventory = PlayerInfo::getInventory(); diff --git a/src/net/ea/inventoryhandler.h b/src/net/ea/inventoryhandler.h index 72b993c4b..d99e34fc6 100644 --- a/src/net/ea/inventoryhandler.h +++ b/src/net/ea/inventoryhandler.h @@ -64,7 +64,7 @@ class EquipBackend : public Equipment::Backend if (PlayerInfo::getInventory()) return PlayerInfo::getInventory()->getItem(invyIndex); else - return 0; + return nullptr; } void clear() diff --git a/src/net/ea/npchandler.cpp b/src/net/ea/npchandler.cpp index 9a37ccc26..e8e1014d4 100644 --- a/src/net/ea/npchandler.cpp +++ b/src/net/ea/npchandler.cpp @@ -33,7 +33,7 @@ namespace Ea { NpcHandler::NpcHandler() : - mDialog(0) + mDialog(nullptr) { } diff --git a/src/net/ea/partyhandler.cpp b/src/net/ea/partyhandler.cpp index 35cc77fbf..5fa0df29b 100644 --- a/src/net/ea/partyhandler.cpp +++ b/src/net/ea/partyhandler.cpp @@ -37,8 +37,8 @@ namespace Ea { -PartyTab *partyTab = 0; -Party *taParty = 0; +PartyTab *partyTab = nullptr; +Party *taParty = nullptr; PartyHandler::PartyHandler() : mShareExp(PARTY_SHARE_UNKNOWN), @@ -50,7 +50,7 @@ PartyHandler::PartyHandler() : PartyHandler::~PartyHandler() { delete partyTab; - partyTab = 0; + partyTab = nullptr; } void PartyHandler::join(int partyId A_UNUSED) @@ -71,7 +71,7 @@ void PartyHandler::reload() void PartyHandler::clear() { - taParty = 0; + taParty = nullptr; } void PartyHandler::processPartyCreate(Net::MessageIn &msg) @@ -128,7 +128,7 @@ void PartyHandler::processPartyInfo(Net::MessageIn &msg) if (Ea::taParty) { - PartyMember *member = 0; + PartyMember *member = nullptr; if (oldParty) { //member = Ea::taParty->getMember(id); @@ -314,7 +314,7 @@ void PartyHandler::processPartySettings(Net::MessageIn &msg) void PartyHandler::processPartyMove(Net::MessageIn &msg) { int id = msg.readInt32(); // id - PartyMember *m = 0; + PartyMember *m = nullptr; if (Ea::taParty) m = Ea::taParty->getMember(id); if (m) @@ -356,7 +356,7 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) } SERVER_NOTICE(_("You have left the party.")) delete Ea::partyTab; - Ea::partyTab = 0; + Ea::partyTab = nullptr; if (socialWindow && Ea::taParty) socialWindow->removeTab(Ea::taParty); @@ -375,7 +375,7 @@ void PartyHandler::processPartyLeave(Net::MessageIn &msg) Being *b = actorSpriteManager->findBeing(id); if (b && b->getType() == Being::PLAYER) { - b->setParty(0); + b->setParty(nullptr); b->setPartyName(""); } } @@ -389,7 +389,7 @@ void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg) int id = msg.readInt32(); int hp = msg.readInt16(); int maxhp = msg.readInt16(); - PartyMember *m = 0; + PartyMember *m = nullptr; if (Ea::taParty) m = Ea::taParty->getMember(id); if (m) @@ -410,7 +410,7 @@ void PartyHandler::processPartyUpdateHp(Net::MessageIn &msg) void PartyHandler::processPartyUpdateCoords(Net::MessageIn &msg) { int id = msg.readInt32(); // id - PartyMember *m = 0; + PartyMember *m = nullptr; if (Ea::taParty) m = Ea::taParty->getMember(id); if (m) diff --git a/src/net/ea/tradehandler.cpp b/src/net/ea/tradehandler.cpp index 19aa474e3..5aaa09f91 100644 --- a/src/net/ea/tradehandler.cpp +++ b/src/net/ea/tradehandler.cpp @@ -53,7 +53,7 @@ namespace { void action(const gcn::ActionEvent &event) { - confirmDlg = 0; + confirmDlg = nullptr; if (event.getId() == "ignore") player_relations.ignoreTrade(tradePartnerName); Net::getTradeHandler()->respond(event.getId() == "yes"); @@ -66,7 +66,7 @@ namespace Ea TradeHandler::TradeHandler() { - confirmDlg = 0; + confirmDlg = nullptr; } void TradeHandler::removeItem(int slotNum A_UNUSED, int amount A_UNUSED) @@ -204,7 +204,7 @@ void TradeHandler::processTradeItemAddResponse(Net::MessageIn &msg) { // Trade: New Item add response (was 0x00ea, now 01b1) const int index = msg.readInt16() - INVENTORY_OFFSET; - Item *item = 0; + Item *item = nullptr; if (PlayerInfo::getInventory()) item = PlayerInfo::getInventory()->getItem(index); |