summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-04-24 13:45:44 +0200
committerworktycho <work.tycho@gmail.com>2015-04-24 13:45:44 +0200
commit20593dcb35a6718b29b4384e2e67851bdf250674 (patch)
tree57f9bdc86eec37c6ee8f4f7934d8dc8941e1ba1a
parentMerge pull request #1894 from mc-server/RefactorManualBindingsTemplates (diff)
downloadcuberite-20593dcb35a6718b29b4384e2e67851bdf250674.tar
cuberite-20593dcb35a6718b29b4384e2e67851bdf250674.tar.gz
cuberite-20593dcb35a6718b29b4384e2e67851bdf250674.tar.bz2
cuberite-20593dcb35a6718b29b4384e2e67851bdf250674.tar.lz
cuberite-20593dcb35a6718b29b4384e2e67851bdf250674.tar.xz
cuberite-20593dcb35a6718b29b4384e2e67851bdf250674.tar.zst
cuberite-20593dcb35a6718b29b4384e2e67851bdf250674.zip
Diffstat (limited to '')
-rw-r--r--src/Root.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Root.cpp b/src/Root.cpp
index 690bd7357..1379b01a2 100644
--- a/src/Root.cpp
+++ b/src/Root.cpp
@@ -607,7 +607,7 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac
size_t Rating = RateCompareString (m_PlayerName, a_pPlayer->GetName());
if ((Rating > 0) && (Rating >= m_BestRating))
{
- m_BestMatch = a_pPlayer;
+ m_BestMatch = a_pPlayer->GetName();
if (Rating > m_BestRating)
{
m_NumMatches = 0;
@@ -627,18 +627,18 @@ bool cRoot::FindAndDoWithPlayer(const AString & a_PlayerName, cPlayerListCallbac
m_BestRating(0),
m_NameLength(a_PlayerName.length()),
m_PlayerName(a_PlayerName),
- m_BestMatch(nullptr),
+ m_BestMatch(),
m_NumMatches(0)
{}
- cPlayer * m_BestMatch;
+ AString m_BestMatch;
unsigned m_NumMatches;
} Callback (a_PlayerName);
ForEachPlayer(Callback);
if (Callback.m_NumMatches == 1)
{
- return a_Callback.Item(Callback.m_BestMatch);
+ return DoWithPlayer(Callback.m_BestMatch, a_Callback);
}
return false;
}