summaryrefslogtreecommitdiffstats
path: root/src/Bindings/LuaState.h
diff options
context:
space:
mode:
authorpeterbell10 <peterbell10@live.co.uk>2017-09-11 23:20:49 +0200
committerMattes D <github@xoft.cz>2017-09-11 23:20:49 +0200
commite225b7f8262df48ad4d7094bc295add3007b0649 (patch)
treea42e9afcc88cfe6e9d1258458e3ad42764083d0e /src/Bindings/LuaState.h
parentcBlockArea: change MakeIndex to return size_t (diff)
downloadcuberite-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/Bindings/LuaState.h5
1 files changed, 3 insertions, 2 deletions
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 <functional>
#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<bool(cLuaState & a_LuaState, int a_Index)> a_ElementCallback) const;
+ void ForEachArrayElement(cFunctionRef<bool(cLuaState & a_LuaState, int a_Index)> 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<bool(cLuaState & a_LuaState)> a_ElementCallback) const;
+ void ForEachElement(cFunctionRef<bool(cLuaState & a_LuaState)> a_ElementCallback) const;
cLuaState & GetLuaState(void) const { return m_LuaState; }