From e225b7f8262df48ad4d7094bc295add3007b0649 Mon Sep 17 00:00:00 2001 From: peterbell10 Date: Mon, 11 Sep 2017 22:20:49 +0100 Subject: Replace ItemCallbacks with lambdas (#3993) --- src/Bindings/LuaState.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Bindings/LuaState.h') diff --git a/src/Bindings/LuaState.h b/src/Bindings/LuaState.h index 98f1cbc28..60af36228 100644 --- a/src/Bindings/LuaState.h +++ b/src/Bindings/LuaState.h @@ -39,6 +39,7 @@ extern "C" #include #include "../Defines.h" +#include "../FunctionRef.h" #include "PluginManager.h" #include "LuaState_Typedefs.inc" @@ -521,14 +522,14 @@ public: The callback receives the LuaState in which the table resides, and the element's index. The LuaState has the element on top of its stack. If the callback returns true, the iteration is aborted, if it returns false, the iteration continues with the next element. */ - void ForEachArrayElement(std::function a_ElementCallback) const; + void ForEachArrayElement(cFunctionRef a_ElementCallback) const; /** Iterates over all dictionary elements in the table in random order, and calls the a_ElementCallback for each of them. The callback receives the LuaState in which the table reside. The LuaState has the element on top of its stack, and the element's key just below it. If the callback returns true, the iteration is aborted, if it returns false, the iteration continues with the next element. */ - void ForEachElement(std::function a_ElementCallback) const; + void ForEachElement(cFunctionRef a_ElementCallback) const; cLuaState & GetLuaState(void) const { return m_LuaState; } -- cgit v1.2.3