From 443e6459b9458820dee087df61c3a3aa1c6bfa5e Mon Sep 17 00:00:00 2001 From: ErodeesFleurs <3353309908@qq.com> Date: Fri, 22 Mar 2024 15:56:20 +0800 Subject: [PATCH] fix pushGlobalContext error --- source/base/StarAssets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/base/StarAssets.cpp b/source/base/StarAssets.cpp index 2bbe509..d4b7228 100644 --- a/source/base/StarAssets.cpp +++ b/source/base/StarAssets.cpp @@ -111,7 +111,7 @@ Assets::Assets(Settings settings, StringList assetSources) { auto luaEngine = LuaEngine::create(); m_luaEngine = luaEngine; - auto pushGlobalContext = [&luaEngine](String const& name, LuaCallbacks & callbacks) { + auto pushGlobalContext = [&luaEngine](String const& name, LuaCallbacks && callbacks) { auto table = luaEngine->createTable(); for (auto const& p : callbacks.callbacks()) table.set(p.first, luaEngine->createWrappedFunction(p.second));