From 49c443896dcac8c4eaf08c4024e8bd2366ad899a Mon Sep 17 00:00:00 2001 From: LogicParrot Date: Sat, 2 Sep 2017 10:45:06 +0300 Subject: Revert "Replace ItemCallbacks with lambdas (#3948)" This reverts commit 496c337cdfa593654018c171f6a74c28272265b5. --- src/Globals.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/Globals.h') diff --git a/src/Globals.h b/src/Globals.h index 78c0539fb..0c48d2ad9 100644 --- a/src/Globals.h +++ b/src/Globals.h @@ -416,6 +416,20 @@ template class SizeChecker; + +/** A generic interface used mainly in ForEach() functions */ +template class cItemCallback +{ +public: + virtual ~cItemCallback() {} + + /** Called for each item in the internal list; return true to stop the loop, or false to continue enumerating */ + virtual bool Item(Type * a_Type) = 0; +} ; + + + + /** Clamp X to the specified range. */ template T Clamp(T a_Value, T a_Min, T a_Max) -- cgit v1.2.3