summaryrefslogtreecommitdiff
path: root/src/net/tmwa/inventoryhandler.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-01-26 16:07:54 +0100
commit5afe88df2538274859a162ffd63ed52118e80c19 (patch)
treeb610dfd58dc748fd63f49565b2a43eea2316714f /src/net/tmwa/inventoryhandler.cpp
parent73ba2a95f5bd4a0dd09af52d5864800be2b0a4c6 (diff)
downloadmana-5afe88df2538274859a162ffd63ed52118e80c19.tar.gz
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.bz2
mana-5afe88df2538274859a162ffd63ed52118e80c19.tar.xz
mana-5afe88df2538274859a162ffd63ed52118e80c19.zip
Apply C++11 fixits
modernize-use-auto modernize-use-nullptr modernize-use-override modernize-use-using
Diffstat (limited to 'src/net/tmwa/inventoryhandler.cpp')
-rw-r--r--src/net/tmwa/inventoryhandler.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/net/tmwa/inventoryhandler.cpp b/src/net/tmwa/inventoryhandler.cpp
index 256e7159..6f32fb3d 100644
--- a/src/net/tmwa/inventoryhandler.cpp
+++ b/src/net/tmwa/inventoryhandler.cpp
@@ -107,8 +107,8 @@ InventoryHandler::InventoryHandler()
handledMessages = _messages;
inventoryHandler = this;
- mStorage = 0;
- mStorageWindow = 0;
+ mStorage = nullptr;
+ mStorageWindow = nullptr;
listen(Event::ItemChannel);
}
@@ -118,7 +118,7 @@ InventoryHandler::~InventoryHandler()
if (mStorageWindow)
{
mStorageWindow->close();
- mStorageWindow = 0;
+ mStorageWindow = nullptr;
}
delete mStorage;
@@ -312,8 +312,8 @@ void InventoryHandler::handleMessage(MessageIn &msg)
if (!mStorage)
mStorage = new Inventory(Inventory::STORAGE, size);
- InventoryItems::iterator it = mInventoryItems.begin();
- InventoryItems::iterator it_end = mInventoryItems.end();
+ auto it = mInventoryItems.begin();
+ auto it_end = mInventoryItems.end();
for (; it != it_end; it++)
mStorage->setItem((*it).slot, (*it).id, (*it).quantity);
mInventoryItems.clear();
@@ -359,11 +359,11 @@ void InventoryHandler::handleMessage(MessageIn &msg)
// Storage access has been closed
// Storage window deletes itself
- mStorageWindow = 0;
+ mStorageWindow = nullptr;
mStorage->clear();
delete mStorage;
- mStorage = 0;
+ mStorage = nullptr;
break;
case SMSG_PLAYER_EQUIPMENT: