diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-02-20 09:49:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 09:49:42 +1100 |
commit | aa987a217779e71f97ee4c9cce531aec1c861bf8 (patch) | |
tree | e51fcce110306d93bf93870f13a5ff7d6b575427 /source/game/scripting/StarLuaComponents.hpp | |
parent | d0099a6d790b66f21e4e266e569d64fb82fb0a81 (diff) | |
parent | 1c89042016c739815b2d70bcbef4673eef6b63e0 (diff) |
Merge branch 'main' into small-fixes
Diffstat (limited to 'source/game/scripting/StarLuaComponents.hpp')
-rw-r--r-- | source/game/scripting/StarLuaComponents.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/game/scripting/StarLuaComponents.hpp b/source/game/scripting/StarLuaComponents.hpp index e739912..98e3638 100644 --- a/source/game/scripting/StarLuaComponents.hpp +++ b/source/game/scripting/StarLuaComponents.hpp @@ -191,7 +191,7 @@ Maybe<Ret> LuaBaseComponent::invoke(String const& name, V&&... args) { auto method = m_context->getPath(name); if (method == LuaNil) return {}; - return m_context->luaTo<LuaFunction>(move(method)).invoke<Ret>(forward<V>(args)...); + return m_context->luaTo<LuaFunction>(std::move(method)).invoke<Ret>(std::forward<V>(args)...); } catch (LuaException const& e) { Logger::error("Exception while invoking lua function '{}'. {}", name, outputException(e, true)); setError(printException(e, false)); @@ -223,15 +223,15 @@ JsonObject LuaStorableComponent<Base>::getScriptStorage() const { template <typename Base> void LuaStorableComponent<Base>::setScriptStorage(JsonObject storage) { if (Base::initialized()) - Base::context()->setPath("storage", move(storage)); + Base::context()->setPath("storage", std::move(storage)); else - m_storage = move(storage); + m_storage = std::move(storage); } template <typename Base> void LuaStorableComponent<Base>::contextSetup() { Base::contextSetup(); - Base::context()->setPath("storage", move(m_storage)); + Base::context()->setPath("storage", std::move(m_storage)); } template <typename Base> @@ -253,7 +253,7 @@ LuaUpdatableComponent<Base>::LuaUpdatableComponent() { }); m_lastDt = GlobalTimestep * GlobalTimescale; - Base::addCallbacks("script", move(scriptCallbacks)); + Base::addCallbacks("script", std::move(scriptCallbacks)); } template <typename Base> @@ -289,7 +289,7 @@ Maybe<Ret> LuaUpdatableComponent<Base>::update(V&&... args) { if (!m_updatePeriodic.tick()) return {}; - return Base::template invoke<Ret>("update", forward<V>(args)...); + return Base::template invoke<Ret>("update", std::forward<V>(args)...); } template <typename Base> @@ -332,7 +332,7 @@ LuaMessageHandlingComponent<Base>::LuaMessageHandlingComponent() { m_messageHandlers.remove(handlerInfo.name); }); - Base::addCallbacks("message", move(scriptCallbacks)); + Base::addCallbacks("message", std::move(scriptCallbacks)); } template <typename Base> |