diff options
author | peterbell10 <peterbell10@live.co.uk> | 2017-09-11 23:20:49 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-09-11 23:20:49 +0200 |
commit | e225b7f8262df48ad4d7094bc295add3007b0649 (patch) | |
tree | a42e9afcc88cfe6e9d1258458e3ad42764083d0e /src/Scoreboard.h | |
parent | cBlockArea: change MakeIndex to return size_t (diff) | |
download | cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.gz cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.bz2 cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.lz cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.xz cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.tar.zst cuberite-e225b7f8262df48ad4d7094bc295add3007b0649.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Scoreboard.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Scoreboard.h b/src/Scoreboard.h index 597c502c7..0e70a7654 100644 --- a/src/Scoreboard.h +++ b/src/Scoreboard.h @@ -11,14 +11,15 @@ +#include "FunctionRef.h" class cObjective; class cTeam; class cWorld; -typedef cItemCallback<cObjective> cObjectiveCallback; -typedef cItemCallback<cTeam> cTeamCallback; +using cObjectiveCallback = cFunctionRef<bool(cObjective &)>; +using cTeamCallback = cFunctionRef<bool(cTeam &)>; @@ -266,15 +267,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, 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(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(cTeamCallback & a_Callback); // Exported in ManualBindings.cpp + bool ForEachTeam(cTeamCallback a_Callback); // Exported in ManualBindings.cpp void SetDisplay(cObjective * a_Objective, eDisplaySlot a_Slot); |