diff options
author | Mattes D <github@xoft.cz> | 2014-03-09 15:04:12 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-03-09 15:04:12 +0100 |
commit | 8a715db41f53dbf0ae838e7386d409fd8274e0ae (patch) | |
tree | 0ea2410e2775a93f1a97c2ff92a6c6deca9f55f1 /src/Root.cpp | |
parent | Updated Core (diff) | |
parent | FIxed int in test (diff) | |
download | cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.tar cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.tar.gz cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.tar.bz2 cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.tar.lz cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.tar.xz cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.tar.zst cuberite-8a715db41f53dbf0ae838e7386d409fd8274e0ae.zip |
Diffstat (limited to 'src/Root.cpp')
-rw-r--r-- | src/Root.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Root.cpp b/src/Root.cpp index 78c94888d..69f18104e 100644 --- a/src/Root.cpp +++ b/src/Root.cpp @@ -593,7 +593,6 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac unsigned m_NameLength; const AString m_PlayerName; - cPlayerListCallback & m_Callback; virtual bool Item (cPlayer * a_pPlayer) { unsigned int Rating = RateCompareString (m_PlayerName, a_pPlayer->GetName()); @@ -615,18 +614,17 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac } public: - cCallback (const AString & a_PlayerName, cPlayerListCallback & a_Callback) : + cCallback (const AString & a_PlayerName) : m_BestRating(0), m_NameLength(a_PlayerName.length()), m_PlayerName(a_PlayerName), - m_Callback(a_Callback), m_BestMatch(NULL), m_NumMatches(0) {} cPlayer * m_BestMatch; unsigned m_NumMatches; - } Callback (a_PlayerName, a_Callback); + } Callback (a_PlayerName); ForEachPlayer( Callback ); if (Callback.m_NumMatches == 1) |