1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-24 04:43:49 +00:00

Fix build with Lua 5.4.6

/home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp: In member function ‘void MWLua::LuaManager::update()’:
/home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp:127:19: error: use of deleted function ‘Settings::SettingValue<T>::SettingValue(const Settings::SettingValue<T>&) [with T = int]’
  127 |             lua_gc(mLua.sol(), LUA_GCSTEP, Settings::lua().mGcStepsPerFrame);
      |             ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/elsid/dev/openmw/components/settings/categories/camera.hpp:5,
                 from /home/elsid/dev/openmw/components/settings/values.hpp:4,
                 from /home/elsid/dev/openmw/apps/openmw/mwlua/luamanagerimp.cpp:16:
/home/elsid/dev/openmw/components/settings/settingvalue.hpp:355:9: note: declared here
  355 |         SettingValue(const SettingValue& other) = delete;
      |         ^~~~~~~~~~~~
This commit is contained in:
elsid 2023-12-08 00:00:54 +01:00
parent 571a097be7
commit 1a39ef07c8
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -123,8 +123,8 @@ namespace MWLua
void LuaManager::update()
{
if (Settings::lua().mGcStepsPerFrame > 0)
lua_gc(mLua.sol(), LUA_GCSTEP, Settings::lua().mGcStepsPerFrame);
if (const int steps = Settings::lua().mGcStepsPerFrame; steps > 0)
lua_gc(mLua.sol(), LUA_GCSTEP, steps);
if (mPlayer.isEmpty())
return; // The game is not started yet.