From 2744e4fa8f39cd06bfe557a5a3881830bd11501c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 20 Jan 2013 20:43:54 +0300 Subject: Last part with FOR_EACH changes. --- src/net/ea/inventoryhandler.cpp | 3 +-- src/net/eathena/loginhandler.cpp | 3 +-- src/net/eathena/network.cpp | 3 +-- src/net/tmwa/loginhandler.cpp | 3 +-- src/net/tmwa/network.cpp | 3 +-- 5 files changed, 5 insertions(+), 10 deletions(-) (limited to 'src/net') diff --git a/src/net/ea/inventoryhandler.cpp b/src/net/ea/inventoryhandler.cpp index 755c6c027..eceb194f9 100644 --- a/src/net/ea/inventoryhandler.cpp +++ b/src/net/ea/inventoryhandler.cpp @@ -429,8 +429,7 @@ void InventoryHandler::processPlayerStorageStatus(Net::MessageIn &msg) if (!mStorage) mStorage = new Inventory(Inventory::STORAGE, size); - for (Ea::InventoryItems::const_iterator it = mInventoryItems.begin(), - it_end = mInventoryItems.end(); it != it_end; ++it) + FOR_EACH (Ea::InventoryItems::const_iterator, it, mInventoryItems) { mStorage->setItem((*it).slot, (*it).id, (*it).quantity, (*it).refine, (*it).color, (*it).equip); diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp index 4ad3593f1..eb0d1914b 100644 --- a/src/net/eathena/loginhandler.cpp +++ b/src/net/eathena/loginhandler.cpp @@ -182,8 +182,7 @@ void LoginHandler::processUpdateHost2(Net::MessageIn &msg) std::string updateHost = msg.readString(len); splitToStringVector(loginData.updateHosts, updateHost, '|'); - for (StringVectIter it = loginData.updateHosts.begin(), - it_end = loginData.updateHosts.end(); it != it_end; ++ it) + FOR_EACH (StringVectIter, it, loginData.updateHosts) { if (!checkPath(*it)) { diff --git a/src/net/eathena/network.cpp b/src/net/eathena/network.cpp index 8d0613f97..00e2fa9cf 100644 --- a/src/net/eathena/network.cpp +++ b/src/net/eathena/network.cpp @@ -146,8 +146,7 @@ void Network::unregisterHandler(MessageHandler *handler) void Network::clearHandlers() { - for (MessageHandlerIterator i = mMessageHandlers.begin(); - i != mMessageHandlers.end(); ++i) + FOR_EACH (MessageHandlerIterator, i, mMessageHandlers) { if (i->second) i->second->setNetwork(nullptr); diff --git a/src/net/tmwa/loginhandler.cpp b/src/net/tmwa/loginhandler.cpp index 76b832586..a3a9f3345 100644 --- a/src/net/tmwa/loginhandler.cpp +++ b/src/net/tmwa/loginhandler.cpp @@ -219,8 +219,7 @@ void LoginHandler::processUpdateHost2(Net::MessageIn &msg) std::string updateHost = msg.readString(len); splitToStringVector(loginData.updateHosts, updateHost, '|'); - for (StringVectIter it = loginData.updateHosts.begin(), - it_end = loginData.updateHosts.end(); it != it_end; ++ it) + FOR_EACH (StringVectIter, it, loginData.updateHosts) { if (!checkPath(*it)) { diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index e256657e0..d0e0686fc 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -124,8 +124,7 @@ void Network::unregisterHandler(MessageHandler *handler) void Network::clearHandlers() { - for (MessageHandlerIterator i = mMessageHandlers.begin(); - i != mMessageHandlers.end(); ++i) + FOR_EACH (MessageHandlerIterator, i, mMessageHandlers) { if (i->second) i->second->setNetwork(nullptr); -- cgit v1.2.3-70-g09d2