From e9a27db028172b5d964cee4421ed5df3af5a1cf0 Mon Sep 17 00:00:00 2001 From: Vincent Date: Mon, 8 Dec 2014 15:58:46 -0800 Subject: Changed DoWithPlayer to auto instead of using iterator. --- src/Root.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Root.cpp') diff --git a/src/Root.cpp b/src/Root.cpp index c59590d95..2234f7fdc 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -651,9 +651,9 @@ bool cRoot::DoWithPlayerByUUID(const AString & a_PlayerUUID, cPlayerListCallback bool cRoot::DoWithPlayer(const AString & a_PlayerName, cPlayerListCallback & a_Callback) { - for (WorldMap::iterator itr = m_WorldsByName.begin(); itr != m_WorldsByName.end(); itr++) + for (auto World : m_WorldsByName) { - if (itr->second->DoWithPlayer(a_PlayerName, a_Callback)) + if (World.second->DoWithPlayer(a_PlayerName, a_Callback)) { return true; } -- cgit v1.2.3