From 4cea2a5cd85b8d3ad905eb3b337b28284c62d4fe Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 8 Nov 2011 00:44:17 +0300 Subject: Fix more gcc 4.7 warnings. --- src/net/ea/inventoryhandler.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/net/ea/inventoryhandler.cpp') 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(); -- cgit v1.2.3-60-g2f50