summaryrefslogtreecommitdiffstats
path: root/src/Scoreboard.h
diff options
context:
space:
mode:
authorLogicParrot <LogicParrot@users.noreply.github.com>2017-09-02 09:45:06 +0200
committerAlexander Harkness <me@bearbin.net>2017-09-02 09:50:23 +0200
commit49c443896dcac8c4eaf08c4024e8bd2366ad899a (patch)
treeb1ec46cab2b4e5731860c7136f1bbfca6fe9d458 /src/Scoreboard.h
parentSetSwimState now takes into account head height (diff)
downloadcuberite-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 '')
-rw-r--r--src/Scoreboard.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/Scoreboard.h b/src/Scoreboard.h
index 047a0cf7b..597c502c7 100644
--- a/src/Scoreboard.h
+++ b/src/Scoreboard.h
@@ -1,4 +1,4 @@
-
+
// Scoreboard.h
// Implementation of a scoreboard that keeps track of specified objectives
@@ -11,15 +11,14 @@
-#include <functional>
class cObjective;
class cTeam;
class cWorld;
-using cObjectiveCallback = std::function<bool(cObjective &)>;
-using cTeamCallback = std::function<bool(cTeam &)>;
+typedef cItemCallback<cObjective> cObjectiveCallback;
+typedef cItemCallback<cTeam> cTeamCallback;
@@ -267,15 +266,15 @@ public:
/** Execute callback for each objective with the specified type
Returns true if all objectives processed, false if the callback aborted by returning true. */
- bool ForEachObjectiveWith(cObjective::eType a_Type, const cObjectiveCallback & a_Callback);
+ bool ForEachObjectiveWith(cObjective::eType a_Type, cObjectiveCallback & a_Callback);
/** Execute callback for each objective.
Returns true if all objectives have been processed, false if the callback aborted by returning true. */
- bool ForEachObjective(const cObjectiveCallback & a_Callback); // Exported in ManualBindings.cpp
+ bool ForEachObjective(cObjectiveCallback & a_Callback); // Exported in ManualBindings.cpp
/** Execute callback for each team.
Returns true if all teams have been processed, false if the callback aborted by returning true. */
- bool ForEachTeam(const cTeamCallback & a_Callback); // Exported in ManualBindings.cpp
+ bool ForEachTeam(cTeamCallback & a_Callback); // Exported in ManualBindings.cpp
void SetDisplay(cObjective * a_Objective, eDisplaySlot a_Slot);