1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-07 12:54:00 +00:00

Move action argument

This commit is contained in:
Andrei Kortunov 2024-02-06 14:18:08 +04:00
parent 66b2d428c8
commit a8c219f07c

View File

@ -241,7 +241,7 @@ namespace MWLua
for (unsigned i = 0; i < newStack.size(); ++i)
newStack[i] = nameToMode.at(LuaUtil::cast<std::string_view>(modes[i + 1]));
luaManager->addAction(
[windowManager, newStack = std::move(newStack), arg]() {
[windowManager, newStack = std::move(newStack), arg = std::move(arg)]() {
MWWorld::Ptr ptr;
if (arg.has_value())
ptr = arg->ptr();