diff options
author | LogicParrot <LogicParrot@users.noreply.github.com> | 2017-09-02 09:45:06 +0200 |
---|---|---|
committer | Alexander Harkness <me@bearbin.net> | 2017-09-02 09:50:23 +0200 |
commit | 49c443896dcac8c4eaf08c4024e8bd2366ad899a (patch) | |
tree | b1ec46cab2b4e5731860c7136f1bbfca6fe9d458 /src/Scoreboard.cpp | |
parent | SetSwimState now takes into account head height (diff) | |
download | cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.gz cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.bz2 cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.lz cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.xz cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.tar.zst cuberite-49c443896dcac8c4eaf08c4024e8bd2366ad899a.zip |
Diffstat (limited to 'src/Scoreboard.cpp')
-rw-r--r-- | src/Scoreboard.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Scoreboard.cpp b/src/Scoreboard.cpp index 5faf88f39..4dde5b2dd 100644 --- a/src/Scoreboard.cpp +++ b/src/Scoreboard.cpp @@ -1,4 +1,4 @@ - + // Scoreboard.cpp // Implementation of a scoreboard that keeps track of specified objectives @@ -487,7 +487,7 @@ cObjective * cScoreboard::GetObjectiveIn(eDisplaySlot a_Slot) -bool cScoreboard::ForEachObjectiveWith(cObjective::eType a_Type, const cObjectiveCallback & a_Callback) +bool cScoreboard::ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback & a_Callback) { cCSLock Lock(m_CSObjectives); @@ -496,7 +496,7 @@ bool cScoreboard::ForEachObjectiveWith(cObjective::eType a_Type, const cObjectiv if (it->second.GetType() == a_Type) { // Call callback - if (a_Callback(it->second)) + if (a_Callback.Item(&it->second)) { return false; } @@ -509,14 +509,14 @@ bool cScoreboard::ForEachObjectiveWith(cObjective::eType a_Type, const cObjectiv -bool cScoreboard::ForEachObjective(const cObjectiveCallback & a_Callback) +bool cScoreboard::ForEachObjective(cObjectiveCallback & a_Callback) { cCSLock Lock(m_CSObjectives); for (cObjectiveMap::iterator it = m_Objectives.begin(); it != m_Objectives.end(); ++it) { // Call callback - if (a_Callback(it->second)) + if (a_Callback.Item(&it->second)) { return false; } @@ -528,14 +528,14 @@ bool cScoreboard::ForEachObjective(const cObjectiveCallback & a_Callback) -bool cScoreboard::ForEachTeam(const cTeamCallback & a_Callback) +bool cScoreboard::ForEachTeam(cTeamCallback & a_Callback) { cCSLock Lock(m_CSTeams); for (cTeamMap::iterator it = m_Teams.begin(); it != m_Teams.end(); ++it) { // Call callback - if (a_Callback(it->second)) + if (a_Callback.Item(&it->second)) { return false; } |