diff options
Diffstat (limited to 'source/game/scripting')
-rw-r--r-- | source/game/scripting/StarInputLuaBindings.cpp | 2 | ||||
-rw-r--r-- | source/game/scripting/StarLuaActorMovementComponent.hpp | 2 | ||||
-rw-r--r-- | source/game/scripting/StarLuaAnimationComponent.hpp | 4 | ||||
-rw-r--r-- | source/game/scripting/StarLuaComponents.cpp | 8 | ||||
-rw-r--r-- | source/game/scripting/StarLuaComponents.hpp | 14 | ||||
-rw-r--r-- | source/game/scripting/StarLuaGameConverters.cpp | 6 | ||||
-rw-r--r-- | source/game/scripting/StarUniverseServerLuaBindings.cpp | 2 | ||||
-rw-r--r-- | source/game/scripting/StarWorldLuaBindings.cpp | 30 |
8 files changed, 34 insertions, 34 deletions
diff --git a/source/game/scripting/StarInputLuaBindings.cpp b/source/game/scripting/StarInputLuaBindings.cpp index 1af5a74..9d710d4 100644 --- a/source/game/scripting/StarInputLuaBindings.cpp +++ b/source/game/scripting/StarInputLuaBindings.cpp @@ -49,7 +49,7 @@ LuaCallbacks LuaBindings::makeInputCallbacks() { result.emplace_back(jEvent.set("processed", pair.second)); } - return move(result); + return std::move(result); }); callbacks.registerCallbackWithSignature<Vec2I>("mousePosition", bind(mem_fn(&Input::mousePosition), input)); diff --git a/source/game/scripting/StarLuaActorMovementComponent.hpp b/source/game/scripting/StarLuaActorMovementComponent.hpp index 6dc0fc6..5744da8 100644 --- a/source/game/scripting/StarLuaActorMovementComponent.hpp +++ b/source/game/scripting/StarLuaActorMovementComponent.hpp @@ -369,7 +369,7 @@ Maybe<Ret> LuaActorMovementComponent<Base>::update(V&&... args) { if (m_autoClearControls) clearControls(); } - Maybe<Ret> ret = Base::template update<Ret>(forward<V>(args)...); + Maybe<Ret> ret = Base::template update<Ret>(std::forward<V>(args)...); performControls(); return ret; } diff --git a/source/game/scripting/StarLuaAnimationComponent.hpp b/source/game/scripting/StarLuaAnimationComponent.hpp index 0cbd280..21742fb 100644 --- a/source/game/scripting/StarLuaAnimationComponent.hpp +++ b/source/game/scripting/StarLuaAnimationComponent.hpp @@ -69,7 +69,7 @@ LuaAnimationComponent<Base>::LuaAnimationComponent() { if (auto image = drawable.part.ptr<Drawable::ImagePart>()) image->transformation.scale(0.125f); - m_drawables.append({move(drawable), renderLayer}); + m_drawables.append({std::move(drawable), renderLayer}); }); animationCallbacks.registerCallback("clearLightSources", [this]() { m_lightSources.clear(); @@ -84,7 +84,7 @@ LuaAnimationComponent<Base>::LuaAnimationComponent() { lightSourceTable.get<Maybe<float>>("beamAmbience").value() }); }); - Base::addCallbacks("localAnimator", move(animationCallbacks)); + Base::addCallbacks("localAnimator", std::move(animationCallbacks)); } template <typename Base> diff --git a/source/game/scripting/StarLuaComponents.cpp b/source/game/scripting/StarLuaComponents.cpp index 2d7c819..9a1b1c4 100644 --- a/source/game/scripting/StarLuaComponents.cpp +++ b/source/game/scripting/StarLuaComponents.cpp @@ -17,14 +17,14 @@ StringList const& LuaBaseComponent::scripts() const { } void LuaBaseComponent::setScript(String script) { - setScripts({move(script)}); + setScripts({std::move(script)}); } void LuaBaseComponent::setScripts(StringList scripts) { if (initialized()) throw LuaComponentException("Cannot call LuaWorldComponent::setScripts when LuaWorldComponent is initialized"); - m_scripts = move(scripts); + m_scripts = std::move(scripts); } void LuaBaseComponent::addCallbacks(String groupName, LuaCallbacks callbacks) { @@ -58,7 +58,7 @@ void LuaBaseComponent::setAutoReInit(bool autoReInit) { } void LuaBaseComponent::setLuaRoot(LuaRootPtr luaRoot) { - m_luaRoot = move(luaRoot); + m_luaRoot = std::move(luaRoot); } LuaRootPtr const& LuaBaseComponent::luaRoot() { @@ -140,7 +140,7 @@ void LuaBaseComponent::contextShutdown() {} void LuaBaseComponent::setError(String error) { m_context.reset(); - m_error = move(error); + m_error = std::move(error); } bool LuaBaseComponent::checkInitialization() { 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> diff --git a/source/game/scripting/StarLuaGameConverters.cpp b/source/game/scripting/StarLuaGameConverters.cpp index e5f8811..64415e6 100644 --- a/source/game/scripting/StarLuaGameConverters.cpp +++ b/source/game/scripting/StarLuaGameConverters.cpp @@ -65,7 +65,7 @@ Maybe<CollisionSet> LuaConverter<CollisionSet>::to(LuaEngine& engine, LuaValue c CollisionSet result; bool failed = false; table->iterate([&result, &failed, &engine](LuaValue, LuaValue value) { - if (auto k = engine.luaMaybeTo<CollisionKind>(move(value))) { + if (auto k = engine.luaMaybeTo<CollisionKind>(std::move(value))) { result.insert(*k); return true; } else { @@ -96,7 +96,7 @@ LuaValue LuaConverter<PlatformerAStar::Path>::from(LuaEngine& engine, Platformer edgeTable.set("jumpVelocity", edge.jumpVelocity); edgeTable.set("source", convertNode(edge.source)); edgeTable.set("target", convertNode(edge.target)); - pathTable.set(pathTableIndex++, move(edgeTable)); + pathTable.set(pathTableIndex++, std::move(edgeTable)); } return pathTable; } @@ -328,7 +328,7 @@ LuaValue LuaConverter<StatModifier>::from(LuaEngine& engine, StatModifier const& } Maybe<StatModifier> LuaConverter<StatModifier>::to(LuaEngine& engine, LuaValue v) { - auto json = engine.luaMaybeTo<Json>(move(v)); + auto json = engine.luaMaybeTo<Json>(std::move(v)); if (!json) return {}; diff --git a/source/game/scripting/StarUniverseServerLuaBindings.cpp b/source/game/scripting/StarUniverseServerLuaBindings.cpp index f6f5cd7..4a6649b 100644 --- a/source/game/scripting/StarUniverseServerLuaBindings.cpp +++ b/source/game/scripting/StarUniverseServerLuaBindings.cpp @@ -123,7 +123,7 @@ StringList LuaBindings::UniverseServerCallbacks::activeWorlds(UniverseServer* un } RpcThreadPromise<Json> LuaBindings::UniverseServerCallbacks::sendWorldMessage(UniverseServer* universe, String const& worldId, String const& message, LuaVariadic<Json> args) { - return universe->sendWorldMessage(parseWorldId(worldId), message, JsonArray::from(move(args))); + return universe->sendWorldMessage(parseWorldId(worldId), message, JsonArray::from(std::move(args))); } } diff --git a/source/game/scripting/StarWorldLuaBindings.cpp b/source/game/scripting/StarWorldLuaBindings.cpp index 1a21bad..7d74a98 100644 --- a/source/game/scripting/StarWorldLuaBindings.cpp +++ b/source/game/scripting/StarWorldLuaBindings.cpp @@ -449,7 +449,7 @@ namespace LuaBindings { auto distributions = distributionConfigs.transformed([](Json const& config) { return BiomeItemDistribution(config, Random::randu64()); }); - return serverWorld->enqueuePlacement(move(distributions), id); + return serverWorld->enqueuePlacement(std::move(distributions), id); }); } @@ -1069,7 +1069,7 @@ namespace LuaBindings { Vec2F const& end, ActorMovementParameters actorMovementParameters, PlatformerAStar::Parameters searchParameters) { - PlatformerAStar::PathFinder pathFinder(world, start, end, move(actorMovementParameters), move(searchParameters)); + PlatformerAStar::PathFinder pathFinder(world, start, end, std::move(actorMovementParameters), std::move(searchParameters)); pathFinder.explore({}); return pathFinder.result(); } @@ -1079,7 +1079,7 @@ namespace LuaBindings { Vec2F const& end, ActorMovementParameters actorMovementParameters, PlatformerAStar::Parameters searchParameters) { - return PlatformerAStar::PathFinder(world, start, end, move(actorMovementParameters), move(searchParameters)); + return PlatformerAStar::PathFinder(world, start, end, std::move(actorMovementParameters), std::move(searchParameters)); } RectI ClientWorldCallbacks::clientWindow(WorldClient* world) { @@ -1205,15 +1205,15 @@ namespace LuaBindings { } LuaTable WorldEntityCallbacks::entityQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { - return LuaBindings::entityQuery<Entity>(world, engine, pos1, pos2, move(options)); + return LuaBindings::entityQuery<Entity>(world, engine, pos1, pos2, std::move(options)); } LuaTable WorldEntityCallbacks::monsterQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { - return LuaBindings::entityQuery<Monster>(world, engine, pos1, pos2, move(options)); + return LuaBindings::entityQuery<Monster>(world, engine, pos1, pos2, std::move(options)); } LuaTable WorldEntityCallbacks::npcQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { - return LuaBindings::entityQuery<Npc>(world, engine, pos1, pos2, move(options)); + return LuaBindings::entityQuery<Npc>(world, engine, pos1, pos2, std::move(options)); } LuaTable WorldEntityCallbacks::objectQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { @@ -1225,18 +1225,18 @@ namespace LuaBindings { engine, pos1, pos2, - move(options), + std::move(options), [&objectName](shared_ptr<Object> const& entity) -> bool { return objectName.empty() || entity->name() == objectName; }); } LuaTable WorldEntityCallbacks::itemDropQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { - return LuaBindings::entityQuery<ItemDrop>(world, engine, pos1, pos2, move(options)); + return LuaBindings::entityQuery<ItemDrop>(world, engine, pos1, pos2, std::move(options)); } LuaTable WorldEntityCallbacks::playerQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { - return LuaBindings::entityQuery<Player>(world, engine, pos1, pos2, move(options)); + return LuaBindings::entityQuery<Player>(world, engine, pos1, pos2, std::move(options)); } LuaTable WorldEntityCallbacks::loungeableQuery(World* world, LuaEngine& engine, Vec2F const& pos1, LuaValue const& pos2, Maybe<LuaTable> options) { @@ -1267,19 +1267,19 @@ namespace LuaBindings { return pos && pos->orientation == orientation; }; - return LuaBindings::entityQuery<LoungeableObject>(world, engine, pos1, pos2, move(options), filter); + return LuaBindings::entityQuery<LoungeableObject>(world, engine, pos1, pos2, std::move(options), filter); } LuaTable WorldEntityCallbacks::entityLineQuery(World* world, LuaEngine& engine, Vec2F const& point1, Vec2F const& point2, Maybe<LuaTable> options) { - return LuaBindings::entityLineQuery<Entity>(world, engine, point1, point2, move(options)); + return LuaBindings::entityLineQuery<Entity>(world, engine, point1, point2, std::move(options)); } LuaTable WorldEntityCallbacks::objectLineQuery(World* world, LuaEngine& engine, Vec2F const& point1, Vec2F const& point2, Maybe<LuaTable> options) { - return LuaBindings::entityLineQuery<Object>(world, engine, point1, point2, move(options)); + return LuaBindings::entityLineQuery<Object>(world, engine, point1, point2, std::move(options)); } LuaTable WorldEntityCallbacks::npcLineQuery(World* world, LuaEngine& engine, Vec2F const& point1, Vec2F const& point2, Maybe<LuaTable> options) { - return LuaBindings::entityLineQuery<Npc>(world, engine, point1, point2, move(options)); + return LuaBindings::entityLineQuery<Npc>(world, engine, point1, point2, std::move(options)); } bool WorldEntityCallbacks::entityExists(World* world, EntityId entityId) { @@ -1744,9 +1744,9 @@ namespace LuaBindings { RpcPromise<Json> WorldEntityCallbacks::sendEntityMessage(World* world, LuaEngine& engine, LuaValue entityId, String const& message, LuaVariadic<Json> args) { if (entityId.is<LuaString>()) - return world->sendEntityMessage(engine.luaTo<String>(entityId), message, JsonArray::from(move(args))); + return world->sendEntityMessage(engine.luaTo<String>(entityId), message, JsonArray::from(std::move(args))); else - return world->sendEntityMessage(engine.luaTo<EntityId>(entityId), message, JsonArray::from(move(args))); + return world->sendEntityMessage(engine.luaTo<EntityId>(entityId), message, JsonArray::from(std::move(args))); } Maybe<bool> WorldEntityCallbacks::loungeableOccupied(World* world, EntityId entityId) { |