Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game
diff options
context:
space:
mode:
Diffstat (limited to 'source/game')
-rw-r--r--source/game/StarActorMovementController.cpp2
-rw-r--r--source/game/StarAmbient.cpp4
-rw-r--r--source/game/StarAnimation.cpp6
-rw-r--r--source/game/StarBehaviorDatabase.cpp4
-rw-r--r--source/game/StarBehaviorState.cpp10
-rw-r--r--source/game/StarBiomePlacement.cpp2
-rw-r--r--source/game/StarCelestialCoordinate.cpp2
-rw-r--r--source/game/StarCelestialDatabase.cpp16
-rw-r--r--source/game/StarCelestialGraphics.cpp18
-rw-r--r--source/game/StarCelestialParameters.cpp6
-rw-r--r--source/game/StarCelestialTypes.cpp10
-rw-r--r--source/game/StarClientContext.cpp10
-rw-r--r--source/game/StarCollisionGenerator.cpp6
-rw-r--r--source/game/StarCommandProcessor.cpp2
-rw-r--r--source/game/StarDamage.cpp28
-rw-r--r--source/game/StarDamageDatabase.cpp4
-rw-r--r--source/game/StarDamageManager.cpp12
-rw-r--r--source/game/StarDrawable.cpp8
-rw-r--r--source/game/StarEffectEmitter.cpp6
-rw-r--r--source/game/StarEffectSourceDatabase.cpp2
-rw-r--r--source/game/StarEntityMap.cpp2
-rw-r--r--source/game/StarEntityMap.hpp2
-rw-r--r--source/game/StarEntityRendering.cpp12
-rw-r--r--source/game/StarEntityRenderingTypes.cpp2
-rw-r--r--source/game/StarFallingBlocksAgent.cpp2
-rw-r--r--source/game/StarForceRegions.cpp6
-rw-r--r--source/game/StarHumanoid.cpp150
-rw-r--r--source/game/StarImageMetadataDatabase.cpp2
-rw-r--r--source/game/StarInput.cpp24
-rw-r--r--source/game/StarItem.cpp10
-rw-r--r--source/game/StarItemBag.cpp6
-rw-r--r--source/game/StarItemDatabase.cpp14
-rw-r--r--source/game/StarItemDescriptor.cpp4
-rw-r--r--source/game/StarItemDrop.cpp12
-rw-r--r--source/game/StarMaterialRenderProfile.cpp6
-rw-r--r--source/game/StarMonster.cpp8
-rw-r--r--source/game/StarMonsterDatabase.cpp6
-rw-r--r--source/game/StarMovementController.cpp6
-rw-r--r--source/game/StarNetPacketSocket.cpp22
-rw-r--r--source/game/StarNetPackets.cpp74
-rw-r--r--source/game/StarNetworkedAnimator.cpp66
-rw-r--r--source/game/StarNpc.cpp4
-rw-r--r--source/game/StarNpcDatabase.cpp2
-rw-r--r--source/game/StarObject.cpp34
-rw-r--r--source/game/StarObjectDatabase.cpp4
-rw-r--r--source/game/StarParallax.cpp2
-rw-r--r--source/game/StarParticleDatabase.cpp2
-rw-r--r--source/game/StarParticleManager.cpp8
-rw-r--r--source/game/StarPlant.cpp10
-rw-r--r--source/game/StarPlantDrop.cpp8
-rw-r--r--source/game/StarPlatformerAStar.cpp4
-rw-r--r--source/game/StarPlayer.cpp20
-rw-r--r--source/game/StarPlayerInventory.cpp12
-rw-r--r--source/game/StarPlayerStorage.cpp6
-rw-r--r--source/game/StarPlayerUniverseMap.cpp6
-rw-r--r--source/game/StarProjectile.cpp20
-rw-r--r--source/game/StarQuests.cpp2
-rw-r--r--source/game/StarRoot.cpp14
-rw-r--r--source/game/StarRootLoader.cpp6
-rw-r--r--source/game/StarServerClientContext.cpp12
-rw-r--r--source/game/StarSky.cpp2
-rw-r--r--source/game/StarSpawnTypeDatabase.cpp2
-rw-r--r--source/game/StarSpawner.cpp2
-rw-r--r--source/game/StarStagehand.cpp2
-rw-r--r--source/game/StarStatCollection.cpp2
-rw-r--r--source/game/StarStatSet.cpp12
-rw-r--r--source/game/StarStatistics.cpp2
-rw-r--r--source/game/StarStatusController.cpp26
-rw-r--r--source/game/StarStoredFunctions.cpp6
-rw-r--r--source/game/StarSystemWorld.cpp12
-rw-r--r--source/game/StarSystemWorld.hpp2
-rw-r--r--source/game/StarSystemWorldClient.cpp8
-rw-r--r--source/game/StarSystemWorldServer.cpp6
-rw-r--r--source/game/StarSystemWorldServerThread.cpp8
-rw-r--r--source/game/StarTeamClient.cpp4
-rw-r--r--source/game/StarTeamManager.cpp2
-rw-r--r--source/game/StarTechController.cpp8
-rw-r--r--source/game/StarTerrainDatabase.cpp2
-rw-r--r--source/game/StarTileSectorArray.hpp8
-rw-r--r--source/game/StarToolUser.cpp14
-rw-r--r--source/game/StarTreasure.cpp2
-rw-r--r--source/game/StarUniverseClient.cpp16
-rw-r--r--source/game/StarUniverseConnection.cpp26
-rw-r--r--source/game/StarUniverseServer.cpp40
-rw-r--r--source/game/StarVehicle.cpp24
-rw-r--r--source/game/StarVehicleDatabase.cpp2
-rw-r--r--source/game/StarWarping.cpp4
-rw-r--r--source/game/StarWeather.cpp8
-rw-r--r--source/game/StarWeatherTypes.cpp4
-rw-r--r--source/game/StarWorldClient.cpp64
-rw-r--r--source/game/StarWorldClientState.cpp4
-rw-r--r--source/game/StarWorldGeneration.cpp4
-rw-r--r--source/game/StarWorldParameters.cpp2
-rw-r--r--source/game/StarWorldServer.cpp38
-rw-r--r--source/game/StarWorldServerThread.cpp16
-rw-r--r--source/game/StarWorldStorage.cpp12
-rw-r--r--source/game/StarWorldStructure.cpp2
-rw-r--r--source/game/StarWorldTemplate.cpp10
-rw-r--r--source/game/interfaces/StarWorld.cpp2
-rw-r--r--source/game/interfaces/StarWorld.hpp8
-rw-r--r--source/game/items/StarActiveItem.cpp20
-rw-r--r--source/game/items/StarArmors.cpp2
-rw-r--r--source/game/items/StarInspectionTool.cpp2
-rw-r--r--source/game/items/StarMaterialItem.cpp8
-rw-r--r--source/game/items/StarTools.cpp2
-rw-r--r--source/game/objects/StarContainerObject.cpp4
-rw-r--r--source/game/objects/StarLoungeableObject.cpp2
-rw-r--r--source/game/objects/StarPhysicsObject.cpp6
-rw-r--r--source/game/scripting/StarInputLuaBindings.cpp2
-rw-r--r--source/game/scripting/StarLuaActorMovementComponent.hpp2
-rw-r--r--source/game/scripting/StarLuaAnimationComponent.hpp4
-rw-r--r--source/game/scripting/StarLuaComponents.cpp8
-rw-r--r--source/game/scripting/StarLuaComponents.hpp14
-rw-r--r--source/game/scripting/StarLuaGameConverters.cpp6
-rw-r--r--source/game/scripting/StarUniverseServerLuaBindings.cpp2
-rw-r--r--source/game/scripting/StarWorldLuaBindings.cpp30
116 files changed, 652 insertions, 650 deletions
diff --git a/source/game/StarActorMovementController.cpp b/source/game/StarActorMovementController.cpp
index 4f574c4..00e3726 100644
--- a/source/game/StarActorMovementController.cpp
+++ b/source/game/StarActorMovementController.cpp
@@ -1104,7 +1104,7 @@ void ActorMovementController::doSetAnchorState(Maybe<EntityAnchorState> anchorSt
}
m_anchorState.set(anchorState);
- m_entityAnchor = move(entityAnchor);
+ m_entityAnchor = std::move(entityAnchor);
if (m_entityAnchor)
setPosition(m_entityAnchor->position);
diff --git a/source/game/StarAmbient.cpp b/source/game/StarAmbient.cpp
index 7209ca8..52d47d6 100644
--- a/source/game/StarAmbient.cpp
+++ b/source/game/StarAmbient.cpp
@@ -13,7 +13,7 @@ AmbientTrackGroup::AmbientTrackGroup() {
tracks = {};
}
-AmbientTrackGroup::AmbientTrackGroup(StringList tracks) : tracks(move(tracks)) {}
+AmbientTrackGroup::AmbientTrackGroup(StringList tracks) : tracks(std::move(tracks)) {}
AmbientTrackGroup::AmbientTrackGroup(Json const& config, String const& directory) {
for (auto track : jsonToStringList(config.get("tracks", JsonArray())))
@@ -27,7 +27,7 @@ Json AmbientTrackGroup::toJson() const {
AmbientNoisesDescription::AmbientNoisesDescription() {}
AmbientNoisesDescription::AmbientNoisesDescription(AmbientTrackGroup day, AmbientTrackGroup night)
- : daySounds(move(day)), nightSounds(move(night)) {}
+ : daySounds(std::move(day)), nightSounds(std::move(night)) {}
AmbientNoisesDescription::AmbientNoisesDescription(Json const& config, String const& directory) {
if (auto day = config.opt("day"))
diff --git a/source/game/StarAnimation.cpp b/source/game/StarAnimation.cpp
index 8a1e9c1..9cbf88a 100644
--- a/source/game/StarAnimation.cpp
+++ b/source/game/StarAnimation.cpp
@@ -44,7 +44,7 @@ void Animation::setAngle(float angle) {
}
void Animation::setProcessing(DirectivesGroup processing) {
- m_processing = move(processing);
+ m_processing = std::move(processing);
}
void Animation::setColor(Color color) {
@@ -52,7 +52,7 @@ void Animation::setColor(Color color) {
}
void Animation::setTag(String tagName, String tagValue) {
- m_tagValues[move(tagName)] = move(tagValue);
+ m_tagValues[std::move(tagName)] = std::move(tagValue);
}
void Animation::clearTags() {
@@ -69,7 +69,7 @@ Drawable Animation::drawable(float pixelSize) const {
if (m_appendFrame)
baseFrame += ":" + toString(m_frame);
- Drawable drawable = Drawable::makeImage(move(baseFrame), pixelSize, m_centered, m_offset);
+ Drawable drawable = Drawable::makeImage(std::move(baseFrame), pixelSize, m_centered, m_offset);
drawable.imagePart().addDirectivesGroup(m_processing);
drawable.rotate(m_angle);
drawable.color = m_color;
diff --git a/source/game/StarBehaviorDatabase.cpp b/source/game/StarBehaviorDatabase.cpp
index 5e08d98..03017ca 100644
--- a/source/game/StarBehaviorDatabase.cpp
+++ b/source/game/StarBehaviorDatabase.cpp
@@ -124,7 +124,7 @@ void parseNodeParameters(JsonObject& parameters) {
}
ActionNode::ActionNode(String name, StringMap<NodeParameter> parameters, StringMap<NodeOutput> output)
- : name(move(name)), parameters(move(parameters)), output(move(output)) { }
+ : name(std::move(name)), parameters(std::move(parameters)), output(std::move(output)) { }
DecoratorNode::DecoratorNode(String const& name, StringMap<NodeParameter> parameters, BehaviorNodeConstPtr child)
: name(name), parameters(parameters), child(child) { }
@@ -214,7 +214,7 @@ BehaviorTreeConstPtr BehaviorDatabase::buildTree(Json const& config, StringMap<N
parameters.set(p.first, p.second);
BehaviorNodeConstPtr root = behaviorNode(config.get("root"), parameters, tree);
tree.root = root;
- return make_shared<BehaviorTree>(move(tree));
+ return std::make_shared<BehaviorTree>(std::move(tree));
}
Json BehaviorDatabase::behaviorConfig(String const& name) const {
diff --git a/source/game/StarBehaviorState.cpp b/source/game/StarBehaviorState.cpp
index 39a800e..c6001af 100644
--- a/source/game/StarBehaviorState.cpp
+++ b/source/game/StarBehaviorState.cpp
@@ -17,7 +17,7 @@ List<NodeParameterType> BlackboardTypes = {
NodeParameterType::String
};
-Blackboard::Blackboard(LuaTable luaContext) : m_luaContext(move(luaContext)) {
+Blackboard::Blackboard(LuaTable luaContext) : m_luaContext(std::move(luaContext)) {
for (auto type : BlackboardTypes) {
m_board.set(type, {});
m_input.set(type, {});
@@ -118,20 +118,20 @@ void Blackboard::clearEphemerals(Set<pair<NodeParameterType, String>> ephemerals
}
}
-DecoratorState::DecoratorState(LuaThread thread) : thread(move(thread)) {
- child = make_shared<NodeState>();
+DecoratorState::DecoratorState(LuaThread thread) : thread(std::move(thread)) {
+ child = std::make_shared<NodeState>();
}
CompositeState::CompositeState(size_t childCount) : index() {
for (size_t i = 0; i < childCount; i++)
- children.append(make_shared<NodeState>());
+ children.append(std::make_shared<NodeState>());
}
CompositeState::CompositeState(size_t childCount, size_t begin) : CompositeState(childCount) {
index = begin;
}
-BehaviorState::BehaviorState(BehaviorTreeConstPtr tree, LuaTable context, Maybe<BlackboardWeakPtr> blackboard) : m_tree(tree), m_luaContext(move(context)) {
+BehaviorState::BehaviorState(BehaviorTreeConstPtr tree, LuaTable context, Maybe<BlackboardWeakPtr> blackboard) : m_tree(tree), m_luaContext(std::move(context)) {
if (blackboard)
m_board = *blackboard;
else
diff --git a/source/game/StarBiomePlacement.cpp b/source/game/StarBiomePlacement.cpp
index a7c2802..0017cde 100644
--- a/source/game/StarBiomePlacement.cpp
+++ b/source/game/StarBiomePlacement.cpp
@@ -55,7 +55,7 @@ EnumMap<BiomePlacementMode> const BiomePlacementModeNames{
};
BiomeItemPlacement::BiomeItemPlacement(BiomeItem item, Vec2I position, float priority)
- : item(move(item)), position(position), priority(priority) {}
+ : item(std::move(item)), position(position), priority(priority) {}
bool BiomeItemPlacement::operator<(BiomeItemPlacement const& rhs) const {
return priority < rhs.priority;
diff --git a/source/game/StarCelestialCoordinate.cpp b/source/game/StarCelestialCoordinate.cpp
index 70bd61d..0c3e914 100644
--- a/source/game/StarCelestialCoordinate.cpp
+++ b/source/game/StarCelestialCoordinate.cpp
@@ -10,7 +10,7 @@ namespace Star {
CelestialCoordinate::CelestialCoordinate() : m_planetaryOrbitNumber(0), m_satelliteOrbitNumber(0) {}
CelestialCoordinate::CelestialCoordinate(Vec3I location, int planetaryOrbitNumber, int satelliteOrbitNumber)
- : m_location(move(location)),
+ : m_location(std::move(location)),
m_planetaryOrbitNumber(planetaryOrbitNumber),
m_satelliteOrbitNumber(satelliteOrbitNumber) {}
diff --git a/source/game/StarCelestialDatabase.cpp b/source/game/StarCelestialDatabase.cpp
index dd0bc51..c1b9a7f 100644
--- a/source/game/StarCelestialDatabase.cpp
+++ b/source/game/StarCelestialDatabase.cpp
@@ -160,11 +160,11 @@ CelestialResponse CelestialMasterDatabase::respondToRequest(CelestialRequest con
auto chunk = getChunk(*chunkLocation);
// System objects are sent by separate system requests.
chunk.systemObjects.clear();
- return makeLeft(move(chunk));
+ return makeLeft(std::move(chunk));
} else if (auto systemLocation = request.maybeRight()) {
auto const& chunk = getChunk(chunkIndexFor(*systemLocation));
CelestialSystemObjects systemObjects = {*systemLocation, chunk.systemObjects.get(*systemLocation)};
- return makeRight(move(systemObjects));
+ return makeRight(std::move(systemObjects));
} else {
return CelestialResponse();
}
@@ -435,7 +435,7 @@ CelestialChunk CelestialMasterDatabase::produceChunk(Vec2I const& chunkIndex) co
for (auto const& systemLocation : systemLocations) {
if (auto systemInformation = produceSystem(random, systemLocation)) {
chunkData.systemParameters[systemLocation] = systemInformation.get().first;
- chunkData.systemObjects[systemLocation] = move(systemInformation.get().second);
+ chunkData.systemObjects[systemLocation] = std::move(systemInformation.get().second);
if (systemInformation.get().first.getParameter("magnitude").toFloat()
>= m_generationInformation.minimumConstellationMagnitude)
@@ -527,11 +527,11 @@ Maybe<pair<CelestialParameters, HashMap<int, CelestialPlanet>>> CelestialMasterD
}
}
- systemObjects[planetPair.first] = move(planet);
+ systemObjects[planetPair.first] = std::move(planet);
}
}
- return pair<CelestialParameters, HashMap<int, CelestialPlanet>>{move(systemParameters), move(systemObjects)};
+ return pair<CelestialParameters, HashMap<int, CelestialPlanet>>{std::move(systemParameters), std::move(systemObjects)};
}
List<CelestialConstellation> CelestialMasterDatabase::produceConstellations(
@@ -619,7 +619,7 @@ List<CelestialConstellation> CelestialMasterDatabase::produceConstellations(
CelestialSlaveDatabase::CelestialSlaveDatabase(CelestialBaseInformation baseInformation) {
auto config = Root::singleton().assets()->json("/celestial.config");
- m_baseInformation = move(baseInformation);
+ m_baseInformation = std::move(baseInformation);
m_requestTimeout = config.getFloat("requestTimeout");
}
@@ -679,12 +679,12 @@ void CelestialSlaveDatabase::pushResponses(List<CelestialResponse> responses) {
for (auto& response : responses) {
if (auto celestialChunk = response.leftPtr()) {
m_pendingChunkRequests.remove(celestialChunk->chunkIndex);
- m_chunkCache.set(celestialChunk->chunkIndex, move(*celestialChunk));
+ m_chunkCache.set(celestialChunk->chunkIndex, std::move(*celestialChunk));
} else if (auto celestialSystemObjects = response.rightPtr()) {
m_pendingSystemRequests.remove(celestialSystemObjects->systemLocation);
auto chunkLocation = chunkIndexFor(celestialSystemObjects->systemLocation);
if (auto chunk = m_chunkCache.ptr(chunkLocation))
- chunk->systemObjects[celestialSystemObjects->systemLocation] = move(celestialSystemObjects->planets);
+ chunk->systemObjects[celestialSystemObjects->systemLocation] = std::move(celestialSystemObjects->planets);
}
}
}
diff --git a/source/game/StarCelestialGraphics.cpp b/source/game/StarCelestialGraphics.cpp
index e1a5aa8..4233635 100644
--- a/source/game/StarCelestialGraphics.cpp
+++ b/source/game/StarCelestialGraphics.cpp
@@ -52,12 +52,12 @@ List<pair<String, float>> CelestialGraphics::drawWorld(
// base layer, otherwise use the bottom most mask image.
if (terrestrialParameters->primarySurfaceLiquid != EmptyLiquidId && !liquidImages.empty()) {
String liquidBaseImage = liquidImages.replace("<liquid>", liquidsDatabase->liquidName(terrestrialParameters->primarySurfaceLiquid));
- layers.append({move(liquidBaseImage), imageScale});
+ layers.append({std::move(liquidBaseImage), imageScale});
} else {
if (baseCount > 0) {
String baseLayer = strf("{}?hueshift={}", baseImages.replace("<biome>",
terrestrialParameters->primaryBiome).replace("<num>", toString(baseCount)), terrestrialParameters->hueShift);
- layers.append({move(baseLayer), imageScale});
+ layers.append({std::move(baseLayer), imageScale});
}
}
@@ -70,12 +70,12 @@ List<pair<String, float>> CelestialGraphics::drawWorld(
if (terrestrialParameters->hueShift != 0)
hueShiftString = strf("?hueshift={}", terrestrialParameters->hueShift);
String layer = baseImage + hueShiftString + dynamicMaskString;
- layers.append({move(layer), imageScale});
+ layers.append({std::move(layer), imageScale});
}
if (!shadowImages.empty()) {
String shadow = shadowImages.replace("<num>", toString(shadowParameters.randomizeParameterRange(gfxConfig.getArray("shadowNumber")).toInt()));
- layers.append({move(shadow), imageScale});
+ layers.append({std::move(shadow), imageScale});
}
} else if (type == "Asteroids") {
@@ -88,18 +88,18 @@ List<pair<String, float>> CelestialGraphics::drawWorld(
String biomeMaskBase = maskImages.replace("<num>", toString(maskCount - i));
String dynamicMask = dynamicsImages.replace("<num>", toString(celestialParameters.randomizeParameterRange("dynamicsRange", i).toInt()));
String layer = strf("{}?addmask={}", biomeMaskBase, dynamicMask);
- layers.append({move(layer), imageScale});
+ layers.append({std::move(layer), imageScale});
}
} else if (type == "FloatingDungeon") {
String image = celestialParameters.getParameter("image").toString();
float imageScale = celestialParameters.getParameter("imageScale", 1.0f).toFloat();
- layers.append({move(image), imageScale});
+ layers.append({std::move(image), imageScale});
if (!celestialParameters.getParameter("dynamicsImages").toString().empty()) {
String dynamicsImages = celestialParameters.getParameter("dynamicsImages", "").toString();
String dynamicsImage = dynamicsImages.replace("<num>", toString(celestialParameters.randomizeParameterRange("dynamicsRange").toInt()));
- layers.append({move(dynamicsImage), imageScale});
+ layers.append({std::move(dynamicsImage), imageScale});
}
} else if (type == "GasGiant") {
@@ -127,7 +127,7 @@ List<pair<String, float>> CelestialGraphics::drawWorld(
if (!shadowImages.empty()) {
String shadow = shadowImages.replace("<num>", toString(shadowParameters.randomizeParameterRange(gfxConfig.getArray("shadowNumber")).toInt()));
- layers.append({move(shadow), imageScale});
+ layers.append({std::move(shadow), imageScale});
}
}
@@ -247,7 +247,7 @@ List<pair<String, float>> CelestialGraphics::drawSystemTwinkle(CelestialDatabase
String twinkleFrame = strf("{}:{}", twinkleFrameset, (int)(std::fmod<double>(time / twinkleTime, 1.0f) * twinkleFrameCount));
- return {{move(twinkleBackground), 1.0f}, {move(twinkleFrame), twinkleScale}};
+ return {{std::move(twinkleBackground), 1.0f}, {std::move(twinkleFrame), twinkleScale}};
}
List<pair<String, float>> CelestialGraphics::drawSystemPlanetaryObject(CelestialDatabasePtr celestialDatabase, CelestialCoordinate const& coordinate) {
diff --git a/source/game/StarCelestialParameters.cpp b/source/game/StarCelestialParameters.cpp
index 9f94c4c..183b270 100644
--- a/source/game/StarCelestialParameters.cpp
+++ b/source/game/StarCelestialParameters.cpp
@@ -12,7 +12,7 @@ namespace Star {
CelestialParameters::CelestialParameters() : m_seed(0) {}
CelestialParameters::CelestialParameters(CelestialCoordinate coordinate, uint64_t seed, String name, Json parameters)
- : m_coordinate(move(coordinate)), m_seed(seed), m_name(move(name)), m_parameters(move(parameters)) {
+ : m_coordinate(std::move(coordinate)), m_seed(seed), m_name(std::move(name)), m_parameters(std::move(parameters)) {
if (auto worldType = getParameter("worldType").optString()) {
if (worldType->equalsIgnoreCase("Terrestrial")) {
auto worldSize = getParameter("worldSize").toString();
@@ -27,7 +27,7 @@ CelestialParameters::CelestialParameters(CelestialCoordinate coordinate, uint64_
}
CelestialParameters::CelestialParameters(ByteArray netStore) {
- DataStreamBuffer ds(move(netStore));
+ DataStreamBuffer ds(std::move(netStore));
ds >> m_coordinate;
ds >> m_seed;
ds >> m_name;
@@ -79,7 +79,7 @@ Json CelestialParameters::parameters() const {
}
Json CelestialParameters::getParameter(String const& name, Json def) const {
- return m_parameters.get(name, move(def));
+ return m_parameters.get(name, std::move(def));
}
Json CelestialParameters::randomizeParameterList(String const& name, int32_t mix) const {
diff --git a/source/game/StarCelestialTypes.cpp b/source/game/StarCelestialTypes.cpp
index 1cb1d79..fa782e2 100644
--- a/source/game/StarCelestialTypes.cpp
+++ b/source/game/StarCelestialTypes.cpp
@@ -49,7 +49,7 @@ CelestialChunk::CelestialChunk(Json const& store) {
CelestialConstellation constellation;
for (auto const& l : lines.toArray())
constellation.append({jsonToVec2I(l.get(0)), jsonToVec2I(l.get(1))});
- constellations.append(move(constellation));
+ constellations.append(std::move(constellation));
}
for (auto const& p : store.getArray("systemParameters"))
@@ -62,10 +62,10 @@ CelestialChunk::CelestialChunk(Json const& store) {
planet.planetParameters = CelestialParameters(planetPair.get(1).get("parameters"));
for (auto const& satellitePair : planetPair.get(1).getArray("satellites"))
planet.satelliteParameters.add(satellitePair.getInt(0), CelestialParameters(satellitePair.get(1)));
- celestialSystemObjects.add(planetPair.getInt(0), move(planet));
+ celestialSystemObjects.add(planetPair.getInt(0), std::move(planet));
}
- systemObjects[jsonToVec3I(p.get(0))] = move(celestialSystemObjects);
+ systemObjects[jsonToVec3I(p.get(0))] = std::move(celestialSystemObjects);
}
}
@@ -92,9 +92,9 @@ Json CelestialChunk::toJson() const {
planetsStore.append(JsonArray{planetPair.first,
JsonObject{
- {"parameters", planetPair.second.planetParameters.diskStore()}, {"satellites", move(satellitesStore)}}});
+ {"parameters", planetPair.second.planetParameters.diskStore()}, {"satellites", std::move(satellitesStore)}}});
}
- systemObjectsStore.append(JsonArray{jsonFromVec3I(systemObjectPair.first), move(planetsStore)});
+ systemObjectsStore.append(JsonArray{jsonFromVec3I(systemObjectPair.first), std::move(planetsStore)});
}
return JsonObject{{"chunkIndex", jsonFromVec2I(chunkIndex)},
diff --git a/source/game/StarClientContext.cpp b/source/game/StarClientContext.cpp
index 748b864..e6fd89a 100644
--- a/source/game/StarClientContext.cpp
+++ b/source/game/StarClientContext.cpp
@@ -25,9 +25,9 @@ DataStream& operator<<(DataStream& ds, ShipUpgrades const& upgrades) {
}
ClientContext::ClientContext(Uuid serverUuid, Uuid playerUuid) {
- m_serverUuid = move(serverUuid);
- m_playerUuid = move(playerUuid);
- m_rpc = make_shared<JsonRpc>();
+ m_serverUuid = std::move(serverUuid);
+ m_playerUuid = std::move(playerUuid);
+ m_rpc = std::make_shared<JsonRpc>();
m_netGroup.addNetElement(&m_orbitWarpActionNetState);
m_netGroup.addNetElement(&m_playerWorldIdNetState);
@@ -81,13 +81,13 @@ void ClientContext::readUpdate(ByteArray data) {
if (data.empty())
return;
- DataStreamBuffer ds(move(data));
+ DataStreamBuffer ds(std::move(data));
m_rpc->receive(ds.read<ByteArray>());
auto shipUpdates = ds.read<ByteArray>();
if (!shipUpdates.empty())
- m_newShipUpdates.merge(DataStreamBuffer::deserialize<WorldChunks>(move(shipUpdates)), true);
+ m_newShipUpdates.merge(DataStreamBuffer::deserialize<WorldChunks>(std::move(shipUpdates)), true);
m_netGroup.readNetState(ds.read<ByteArray>());
}
diff --git a/source/game/StarCollisionGenerator.cpp b/source/game/StarCollisionGenerator.cpp
index d7606dd..d9e7af7 100644
--- a/source/game/StarCollisionGenerator.cpp
+++ b/source/game/StarCollisionGenerator.cpp
@@ -33,9 +33,9 @@ void CollisionGenerator::getBlocksPlatforms(List<CollisionBlock>& list, RectI co
CollisionBlock block;
block.space = Vec2I(x, y);
block.kind = kind;
- block.poly = PolyF(move(vertices));
+ block.poly = PolyF(std::move(vertices));
block.polyBounds = block.poly.boundBox();
- list.append(move(block));
+ list.append(std::move(block));
};
// This was once simple and elegant and made sense but then I made it
@@ -151,7 +151,7 @@ void CollisionGenerator::getBlocksMarchingSquares(List<CollisionBlock>& list, Re
}
block.polyBounds = block.poly.boundBox();
block.kind = std::max({collisionKind(x, y), collisionKind(x + 1, y), collisionKind(x, y + 1), collisionKind(x + 1, y + 1)});
- list.append(move(block));
+ list.append(std::move(block));
};
int xMin = region.xMin();
diff --git a/source/game/StarCommandProcessor.cpp b/source/game/StarCommandProcessor.cpp
index 4775a1e..02a8ec0 100644
--- a/source/game/StarCommandProcessor.cpp
+++ b/source/game/StarCommandProcessor.cpp
@@ -440,7 +440,7 @@ String CommandProcessor::spawnVehicle(ConnectionId connectionId, String const& a
bool done = m_universe->executeForClient(connectionId,
[&](WorldServer* world, PlayerPtr const& player) {
vehicle->setPosition(player->aimPosition());
- world->addEntity(move(vehicle));
+ world->addEntity(std::move(vehicle));
});
return done ? "" : "Invalid client state";
diff --git a/source/game/StarDamage.cpp b/source/game/StarDamage.cpp
index 83c88ce..cbfab6f 100644
--- a/source/game/StarDamage.cpp
+++ b/source/game/StarDamage.cpp
@@ -61,18 +61,18 @@ DamageSource::DamageSource(DamageType damageType,
List<EphemeralStatusEffect> statusEffects,
Knockback knockback,
bool rayCheck)
- : damageType(move(damageType)),
- damageArea(move(damageArea)),
- damage(move(damage)),
- trackSourceEntity(move(trackSourceEntity)),
- sourceEntityId(move(sourceEntityId)),
- team(move(team)),
- damageRepeatGroup(move(damageRepeatGroup)),
- damageRepeatTimeout(move(damageRepeatTimeout)),
- damageSourceKind(move(damageSourceKind)),
- statusEffects(move(statusEffects)),
- knockback(move(knockback)),
- rayCheck(move(rayCheck)) {}
+ : damageType(std::move(damageType)),
+ damageArea(std::move(damageArea)),
+ damage(std::move(damage)),
+ trackSourceEntity(std::move(trackSourceEntity)),
+ sourceEntityId(std::move(sourceEntityId)),
+ team(std::move(team)),
+ damageRepeatGroup(std::move(damageRepeatGroup)),
+ damageRepeatTimeout(std::move(damageRepeatTimeout)),
+ damageSourceKind(std::move(damageSourceKind)),
+ statusEffects(std::move(statusEffects)),
+ knockback(std::move(knockback)),
+ rayCheck(std::move(rayCheck)) {}
Json DamageSource::toJson() const {
Json damageAreaJson;
@@ -266,8 +266,8 @@ DamageNotification::DamageNotification(EntityId sourceEntityId,
damageDealt(damageDealt),
healthLost(healthLost),
hitType(hitType),
- damageSourceKind(move(damageSourceKind)),
- targetMaterialKind(move(targetMaterialKind)) {}
+ damageSourceKind(std::move(damageSourceKind)),
+ targetMaterialKind(std::move(targetMaterialKind)) {}
Json DamageNotification::toJson() const {
return JsonObject{{"sourceEntityId", sourceEntityId},
diff --git a/source/game/StarDamageDatabase.cpp b/source/game/StarDamageDatabase.cpp
index 9982a35..8248295 100644
--- a/source/game/StarDamageDatabase.cpp
+++ b/source/game/StarDamageDatabase.cpp
@@ -15,7 +15,7 @@ DamageDatabase::DamageDatabase() {
for (auto particle : p.second.getObject("damageNumberParticles")) {
type.damageNumberParticles.set(HitTypeNames.getLeft(particle.first), particle.second.toString());
}
- m_elementalTypes.set(p.first, move(type));
+ m_elementalTypes.set(p.first, std::move(type));
}
auto files = assets->scanExtension("damage");
@@ -43,7 +43,7 @@ DamageDatabase::DamageDatabase() {
if (!m_elementalTypes.contains(kind.elementalType))
throw StarException(strf("Undefined elemental type {} in damage kind {}", kind.elementalType, name));
- m_damageKinds.set(name, move(kind));
+ m_damageKinds.set(name, std::move(kind));
}
}
diff --git a/source/game/StarDamageManager.cpp b/source/game/StarDamageManager.cpp
index 8c95a4f..dadaafb 100644
--- a/source/game/StarDamageManager.cpp
+++ b/source/game/StarDamageManager.cpp
@@ -117,7 +117,7 @@ void DamageManager::update(float dt) {
addHitRequest({causingEntity->entityId(), targetEntity->entityId(), damageRequest});
if (damageSource.damageType != NoDamage)
- addDamageRequest({causingEntity->entityId(), targetEntity->entityId(), move(damageRequest)});
+ addDamageRequest({causingEntity->entityId(), targetEntity->entityId(), std::move(damageRequest)});
}
}
}
@@ -144,7 +144,7 @@ void DamageManager::pushRemoteDamageRequest(RemoteDamageRequest const& remoteDam
if (auto targetEntity = m_world->entity(remoteDamageRequest.targetEntityId)) {
starAssert(targetEntity->isMaster());
for (auto& damageNotification : targetEntity->applyDamage(remoteDamageRequest.damageRequest))
- addDamageNotification({remoteDamageRequest.damageRequest.sourceEntityId, move(damageNotification)});
+ addDamageNotification({remoteDamageRequest.damageRequest.sourceEntityId, std::move(damageNotification)});
}
}
@@ -155,7 +155,7 @@ void DamageManager::pushRemoteDamageNotification(RemoteDamageNotification remote
sourceEntity->damagedOther(remoteDamageNotification.damageNotification);
}
- m_pendingNotifications.append(move(remoteDamageNotification.damageNotification));
+ m_pendingNotifications.append(std::move(remoteDamageNotification.damageNotification));
}
List<RemoteHitRequest> DamageManager::pullRemoteHitRequests() {
@@ -251,14 +251,14 @@ void DamageManager::addHitRequest(RemoteHitRequest const& remoteHitRequest) {
void DamageManager::addDamageRequest(RemoteDamageRequest remoteDamageRequest) {
if (remoteDamageRequest.destinationConnection() == m_connectionId)
- pushRemoteDamageRequest(move(remoteDamageRequest));
+ pushRemoteDamageRequest(std::move(remoteDamageRequest));
else
- m_pendingRemoteDamageRequests.append(move(remoteDamageRequest));
+ m_pendingRemoteDamageRequests.append(std::move(remoteDamageRequest));
}
void DamageManager::addDamageNotification(RemoteDamageNotification remoteDamageNotification) {
pushRemoteDamageNotification(remoteDamageNotification);
- m_pendingRemoteNotifications.append(move(remoteDamageNotification));
+ m_pendingRemoteNotifications.append(std::move(remoteDamageNotification));
}
}
diff --git a/source/game/StarDrawable.cpp b/source/game/StarDrawable.cpp
index 08c14be..2c527a5 100644
--- a/source/game/StarDrawable.cpp
+++ b/source/game/StarDrawable.cpp
@@ -70,7 +70,7 @@ Drawable::ImagePart& Drawable::ImagePart::removeDirectives(bool keepImageCenterP
Drawable Drawable::makeLine(Line2F const& line, float lineWidth, Color const& color, Vec2F const& position) {
Drawable drawable;
- drawable.part = LinePart{move(line), lineWidth};
+ drawable.part = LinePart{std::move(line), lineWidth};
drawable.color = color;
drawable.position = position;
@@ -79,7 +79,7 @@ Drawable Drawable::makeLine(Line2F const& line, float lineWidth, Color const& co
Drawable Drawable::makePoly(PolyF poly, Color const& color, Vec2F const& position) {
Drawable drawable;
- drawable.part = PolyPart{move(poly)};
+ drawable.part = PolyPart{std::move(poly)};
drawable.color = color;
drawable.position = position;
@@ -98,7 +98,7 @@ Drawable Drawable::makeImage(AssetPath image, float pixelSize, bool centered, Ve
if (pixelSize != 1.0f)
transformation.scale(pixelSize);
- drawable.part = ImagePart{move(image), move(transformation)};
+ drawable.part = ImagePart{std::move(image), std::move(transformation)};
drawable.position = position;
drawable.color = color;
@@ -132,7 +132,7 @@ Drawable::Drawable(Json const& json) {
transformation.scale(*scale);
}
- part = ImagePart{move(imageString), move(transformation)};
+ part = ImagePart{std::move(imageString), std::move(transformation)};
}
position = json.opt("position").apply(jsonToVec2F).value();
color = json.opt("color").apply(jsonToColor).value(Color::White);
diff --git a/source/game/StarEffectEmitter.cpp b/source/game/StarEffectEmitter.cpp
index 1443172..ddb0355 100644
--- a/source/game/StarEffectEmitter.cpp
+++ b/source/game/StarEffectEmitter.cpp
@@ -15,11 +15,11 @@ EffectEmitter::EffectEmitter() {
void EffectEmitter::addEffectSources(String const& position, StringSet effectSources) {
for (auto& e : effectSources)
- m_newSources.add({position, move(e)});
+ m_newSources.add({position, std::move(e)});
}
void EffectEmitter::setSourcePosition(String name, Vec2F const& position) {
- m_positions[move(name)] = position;
+ m_positions[std::move(name)] = position;
}
void EffectEmitter::setDirection(Direction direction) {
@@ -32,7 +32,7 @@ void EffectEmitter::setBaseVelocity(Vec2F const& velocity) {
void EffectEmitter::tick(float dt, EntityMode mode) {
if (mode == EntityMode::Master) {
- m_activeSources.set(move(m_newSources));
+ m_activeSources.set(std::move(m_newSources));
m_newSources.clear();
} else {
if (!m_newSources.empty())
diff --git a/source/game/StarEffectSourceDatabase.cpp b/source/game/StarEffectSourceDatabase.cpp
index fe65a2a..ab3c112 100644
--- a/source/game/StarEffectSourceDatabase.cpp
+++ b/source/game/StarEffectSourceDatabase.cpp
@@ -183,7 +183,7 @@ List<AudioInstancePtr> soundsFromDefinition(Json const& config, Vec2F const& pos
sample->setRangeMultiplier(entry.getFloat("audioRangeMultiplier", 1.0f));
sample->setPosition(position);
- result.append(move(sample));
+ result.append(std::move(sample));
}
return result;
}
diff --git a/source/game/StarEntityMap.cpp b/source/game/StarEntityMap.cpp
index 6a22a67..c82c7bd 100644
--- a/source/game/StarEntityMap.cpp
+++ b/source/game/StarEntityMap.cpp
@@ -68,7 +68,7 @@ void EntityMap::addEntity(EntityPtr entity) {
if (uniqueId && m_uniqueMap.hasLeftValue(*uniqueId))
throw EntityMapException::format("Duplicate entity unique id ({}) on entity id ({}) in EntityMap::addEntity", *uniqueId, entityId);
- m_spatialMap.set(entityId, m_geometry.splitRect(boundBox, position), move(entity));
+ m_spatialMap.set(entityId, m_geometry.splitRect(boundBox, position), std::move(entity));
if (uniqueId)
m_uniqueMap.add(*uniqueId, entityId);
}
diff --git a/source/game/StarEntityMap.hpp b/source/game/StarEntityMap.hpp
index bf8a12a..73883e4 100644
--- a/source/game/StarEntityMap.hpp
+++ b/source/game/StarEntityMap.hpp
@@ -182,7 +182,7 @@ List<shared_ptr<EntityT>> EntityMap::atTile(Vec2I const& pos) const {
List<shared_ptr<EntityT>> list;
forEachEntityAtTile(pos, [&](TileEntityPtr const& entity) {
if (auto e = as<EntityT>(entity))
- list.append(move(e));
+ list.append(std::move(e));
return false;
});
return list;
diff --git a/source/game/StarEntityRendering.cpp b/source/game/StarEntityRendering.cpp
index a18bf16..1390cd7 100644
--- a/source/game/StarEntityRendering.cpp
+++ b/source/game/StarEntityRendering.cpp
@@ -9,40 +9,40 @@ RenderCallback::~RenderCallback() {}
void RenderCallback::addDrawables(List<Drawable> drawables, EntityRenderLayer renderLayer, Vec2F translate) {
for (auto& drawable : drawables) {
drawable.translate(translate);
- addDrawable(move(drawable), renderLayer);
+ addDrawable(std::move(drawable), renderLayer);
}
}
void RenderCallback::addLightSources(List<LightSource> lightSources, Vec2F translate) {
for (auto& lightSource : lightSources) {
lightSource.translate(translate);
- addLightSource(move(lightSource));
+ addLightSource(std::move(lightSource));
}
}
void RenderCallback::addParticles(List<Particle> particles, Vec2F translate) {
for (auto& particle : particles) {
particle.translate(translate);
- addParticle(move(particle));
+ addParticle(std::move(particle));
}
}
void RenderCallback::addAudios(List<AudioInstancePtr> audios, Vec2F translate) {
for (auto& audio : audios) {
audio->translate(translate);
- addAudio(move(audio));
+ addAudio(std::move(audio));
}
}
void RenderCallback::addTilePreviews(List<PreviewTile> previews) {
for (auto& preview : previews)
- addTilePreview(move(preview));
+ addTilePreview(std::move(preview));
}
void RenderCallback::addOverheadBars(List<OverheadBar> bars, Vec2F translate) {
for (auto& bar : bars) {
bar.entityPosition += translate;
- addOverheadBar(move(bar));
+ addOverheadBar(std::move(bar));
}
}
diff --git a/source/game/StarEntityRenderingTypes.cpp b/source/game/StarEntityRenderingTypes.cpp
index 12a80fa..bf118c7 100644
--- a/source/game/StarEntityRenderingTypes.cpp
+++ b/source/game/StarEntityRenderingTypes.cpp
@@ -114,7 +114,7 @@ OverheadBar::OverheadBar(Json const& json) {
}
OverheadBar::OverheadBar(Maybe<String> icon, float percentage, Color color, bool detailOnly)
- : icon(move(icon)), percentage(percentage), color(move(color)), detailOnly(detailOnly) {}
+ : icon(std::move(icon)), percentage(percentage), color(std::move(color)), detailOnly(detailOnly) {}
EnumMap<EntityHighlightEffectType> const EntityHighlightEffectTypeNames{
{EntityHighlightEffectType::None, "none"},
diff --git a/source/game/StarFallingBlocksAgent.cpp b/source/game/StarFallingBlocksAgent.cpp
index 945daf5..bb9dd84 100644
--- a/source/game/StarFallingBlocksAgent.cpp
+++ b/source/game/StarFallingBlocksAgent.cpp
@@ -5,7 +5,7 @@
namespace Star {
FallingBlocksAgent::FallingBlocksAgent(FallingBlocksFacadePtr worldFacade)
- : m_facade(move(worldFacade)) {
+ : m_facade(std::move(worldFacade)) {
m_immediateUpwardPropagateProbability = Root::singleton().assets()->json("/worldserver.config:fallingBlocksImmediateUpwardPropogateProbability").toFloat();
}
diff --git a/source/game/StarForceRegions.cpp b/source/game/StarForceRegions.cpp
index ec6bddd..5fae0e2 100644
--- a/source/game/StarForceRegions.cpp
+++ b/source/game/StarForceRegions.cpp
@@ -5,15 +5,15 @@
namespace Star {
PhysicsCategoryFilter PhysicsCategoryFilter::whitelist(StringSet categories) {
- return PhysicsCategoryFilter(Whitelist, move(categories));
+ return PhysicsCategoryFilter(Whitelist, std::move(categories));
}
PhysicsCategoryFilter PhysicsCategoryFilter::blacklist(StringSet categories) {
- return PhysicsCategoryFilter(Blacklist, move(categories));
+ return PhysicsCategoryFilter(Blacklist, std::move(categories));
}
PhysicsCategoryFilter::PhysicsCategoryFilter(Type type, StringSet categories)
- : type(type), categories(move(categories)) {}
+ : type(type), categories(std::move(categories)) {}
bool PhysicsCategoryFilter::check(StringSet const& otherCategories) const {
bool intersection = categories.hasIntersection(otherCategories);
diff --git a/source/game/StarHumanoid.cpp b/source/game/StarHumanoid.cpp
index 64c5f46..78b615b 100644
--- a/source/game/StarHumanoid.cpp
+++ b/source/game/StarHumanoid.cpp
@@ -332,47 +332,47 @@ HumanoidIdentity const& Humanoid::identity() const {
}
void Humanoid::setHeadArmorDirectives(Directives directives) {
- m_headArmorDirectives = move(directives);
+ m_headArmorDirectives = std::move(directives);
}
void Humanoid::setHeadArmorFrameset(String headFrameset) {
- m_headArmorFrameset = move(headFrameset);
+ m_headArmorFrameset = std::move(headFrameset);
}
void Humanoid::setChestArmorDirectives(Directives directives) {
- m_chestArmorDirectives = move(directives);
+ m_chestArmorDirectives = std::move(directives);
}
void Humanoid::setChestArmorFrameset(String chest) {
- m_chestArmorFrameset = move(chest);
+ m_chestArmorFrameset = std::move(chest);
}
void Humanoid::setBackSleeveFrameset(String backSleeveFrameset) {
- m_backSleeveFrameset = move(backSleeveFrameset);
+ m_backSleeveFrameset = std::move(backSleeveFrameset);
}
void Humanoid::setFrontSleeveFrameset(String frontSleeveFrameset) {
- m_frontSleeveFrameset = move(frontSleeveFrameset);
+ m_frontSleeveFrameset = std::move(frontSleeveFrameset);
}
void Humanoid::setLegsArmorDirectives(Directives directives) {
- m_legsArmorDirectives = move(directives);
+ m_legsArmorDirectives = std::move(directives);
}
void Humanoid::setLegsArmorFrameset(String legsFrameset) {
- m_legsArmorFrameset = move(legsFrameset);
+ m_legsArmorFrameset = std::move(legsFrameset);
}
void Humanoid::setBackArmorDirectives(Directives directives) {
- m_backArmorDirectives = move(directives);
+ m_backArmorDirectives = std::move(directives);
}
void Humanoid::setBackArmorFrameset(String backFrameset) {
- m_backArmorFrameset = move(backFrameset);
+ m_backArmorFrameset = std::move(backFrameset);
}
void Humanoid::setHelmetMaskDirectives(Directives helmetMaskDirectives) {
- m_helmetMaskDirectives = move(helmetMaskDirectives);
+ m_helmetMaskDirectives = std::move(helmetMaskDirectives);
}
void Humanoid::setBodyHidden(bool hidden) {
@@ -453,16 +453,16 @@ void Humanoid::setPrimaryHandParameters(bool holdingItem, float angle, float ite
}
void Humanoid::setPrimaryHandFrameOverrides(String backFrameOverride, String frontFrameOverride) {
- m_primaryHand.backFrame = !backFrameOverride.empty() ? move(backFrameOverride) : "rotation";
- m_primaryHand.frontFrame = !frontFrameOverride.empty() ? move(frontFrameOverride) : "rotation";
+ m_primaryHand.backFrame = !backFrameOverride.empty() ? std::move(backFrameOverride) : "rotation";
+ m_primaryHand.frontFrame = !frontFrameOverride.empty() ? std::move(frontFrameOverride) : "rotation";
}
void Humanoid::setPrimaryHandDrawables(List<Drawable> drawables) {
- m_primaryHand.itemDrawables = move(drawables);
+ m_primaryHand.itemDrawables = std::move(drawables);
}
void Humanoid::setPrimaryHandNonRotatedDrawables(List<Drawable> drawables) {
- m_primaryHand.nonRotatedDrawables = move(drawables);
+ m_primaryHand.nonRotatedDrawables = std::move(drawables);
}
void Humanoid::setAltHandParameters(bool holdingItem, float angle, float itemAngle, bool recoil,
@@ -475,16 +475,16 @@ void Humanoid::setAltHandParameters(bool holdingItem, float angle, float itemAng
}
void Humanoid::setAltHandFrameOverrides(String backFrameOverride, String frontFrameOverride) {
- m_altHand.backFrame = !backFrameOverride.empty() ? move(backFrameOverride) : "rotation";
- m_altHand.frontFrame = !frontFrameOverride.empty() ? move(frontFrameOverride) : "rotation";
+ m_altHand.backFrame = !backFrameOverride.empty() ? std::move(backFrameOverride) : "rotation";
+ m_altHand.frontFrame = !frontFrameOverride.empty() ? std::move(frontFrameOverride) : "rotation";
}
void Humanoid::setAltHandDrawables(List<Drawable> drawables) {
- m_altHand.itemDrawables = move(drawables);
+ m_altHand.itemDrawables = std::move(drawables);
}
void Humanoid::setAltHandNonRotatedDrawables(List<Drawable> drawables) {
- m_altHand.nonRotatedDrawables = move(drawables);
+ m_altHand.nonRotatedDrawables = std::move(drawables);
}
void Humanoid::animate(float dt) {
@@ -529,12 +529,12 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
if (m_facingDirection == Direction::Left)
drawable.scale(Vec2F(-1, 1));
drawable.fullbright = drawable.fullbright || forceFullbright;
- drawables.append(move(drawable));
+ drawables.append(std::move(drawable));
};
auto backArmDrawable = [&](String const& frameSet, Directives const& directives) -> Drawable {
String image = strf("{}:{}", frameSet, backHand.backFrame);
- Drawable backArm = Drawable::makeImage(move(image), 1.0f / TilePixels, true, backArmFrameOffset);
+ Drawable backArm = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, backArmFrameOffset);
backArm.imagePart().addDirectives(directives, true);
backArm.rotate(backHand.angle, backArmFrameOffset + m_backArmRotationCenter + m_backArmOffset);
return backArm;
@@ -552,9 +552,9 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
else
image = strf("{}:{}.{}", m_backArmorFrameset, frameGroup, bodyStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, Vec2F());
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, Vec2F());
drawable.imagePart().addDirectives(getBackDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (backHand.holdingItem && !dance.isValid() && withItems) {
@@ -562,7 +562,7 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
for (auto& backHandItem : backHand.itemDrawables) {
backHandItem.translate(m_frontHandPosition + backArmFrameOffset + m_backArmOffset);
backHandItem.rotate(backHand.itemAngle, backArmFrameOffset + m_backArmRotationCenter + m_backArmOffset);
- addDrawable(move(backHandItem));
+ addDrawable(std::move(backHandItem));
}
};
if (!m_twoHanded && backHand.outsideOfHand)
@@ -585,11 +585,11 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
position = m_identity.personality.armOffset / TilePixels;
} else
image = strf("{}:{}.{}", m_backArmFrameset, frameBase(m_state), armStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, position);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, position);
drawable.imagePart().addDirectives(getBodyDirectives(), true);
if (dance.isValid())
drawable.rotate(danceStep->backArmRotation);
- addDrawable(move(drawable), m_bodyFullbright);
+ addDrawable(std::move(drawable), m_bodyFullbright);
}
if (!m_backSleeveFrameset.empty()) {
String image;
@@ -602,11 +602,11 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
position = m_identity.personality.armOffset / TilePixels;
} else
image = strf("{}:{}.{}", m_backSleeveFrameset, frameBase(m_state), armStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, position);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, position);
drawable.imagePart().addDirectives(getChestDirectives(), true);
if (dance.isValid())
drawable.rotate(danceStep->backArmRotation);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
}
@@ -628,23 +628,23 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
if (!m_headFrameset.empty() && !m_bodyHidden) {
String image = strf("{}:normal", m_headFrameset);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, headPosition);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, headPosition);
drawable.imagePart().addDirectives(getBodyDirectives(), true);
- addDrawable(move(drawable), m_bodyFullbright);
+ addDrawable(std::move(drawable), m_bodyFullbright);
}
if (!m_emoteFrameset.empty() && !m_bodyHidden) {
String image = strf("{}:{}.{}", m_emoteFrameset, emoteFrameBase(m_emoteState), emoteStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, headPosition);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, headPosition);
drawable.imagePart().addDirectives(getEmoteDirectives(), true);
- addDrawable(move(drawable), m_bodyFullbright);
+ addDrawable(std::move(drawable), m_bodyFullbright);
}
if (!m_hairFrameset.empty() && !m_bodyHidden) {
String image = strf("{}:normal", m_hairFrameset);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, headPosition);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, headPosition);
drawable.imagePart().addDirectives(getHairDirectives(), true).addDirectives(getHelmetMaskDirectives(), true);
- addDrawable(move(drawable), m_bodyFullbright);
+ addDrawable(std::move(drawable), m_bodyFullbright);
}
if (!m_bodyFrameset.empty() && !m_bodyHidden) {
@@ -655,9 +655,9 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
image = strf("{}:{}", m_bodyFrameset, m_identity.personality.idle);
else
image = strf("{}:{}.{}", m_bodyFrameset, frameBase(m_state), bodyStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, {});
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, {});
drawable.imagePart().addDirectives(getBodyDirectives(), true);
- addDrawable(move(drawable), m_bodyFullbright);
+ addDrawable(std::move(drawable), m_bodyFullbright);
}
if (!m_legsArmorFrameset.empty()) {
@@ -668,9 +668,9 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
image = strf("{}:{}", m_legsArmorFrameset, m_identity.personality.idle);
else
image = strf("{}:{}.{}", m_legsArmorFrameset, frameBase(m_state), bodyStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, {});
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, {});
drawable.imagePart().addDirectives(getLegsDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_chestArmorFrameset.empty()) {
@@ -690,30 +690,30 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
image = strf("{}:chest.1", m_chestArmorFrameset);
if (m_state != Duck)
position[1] += bobYOffset;
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, position);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, position);
drawable.imagePart().addDirectives(getChestDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_facialHairFrameset.empty() && !m_bodyHidden) {
String image = strf("{}:normal", m_facialHairFrameset);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, headPosition);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, headPosition);
drawable.imagePart().addDirectives(getFacialHairDirectives(), true).addDirectives(getHelmetMaskDirectives(), true);
- addDrawable(move(drawable), m_bodyFullbright);
+ addDrawable(std::move(drawable), m_bodyFullbright);
}
if (!m_facialMaskFrameset.empty() && !m_bodyHidden) {
String image = strf("{}:normal", m_facialMaskFrameset);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, headPosition);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, headPosition);
drawable.imagePart().addDirectives(getFacialMaskDirectives(), true).addDirectives(getHelmetMaskDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_headArmorFrameset.empty()) {
String image = strf("{}:normal", m_headArmorFrameset);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, headPosition);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, headPosition);
drawable.imagePart().addDirectives(getHeadDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
auto frontArmDrawable = [&](String const& frameSet, Directives const& directives) -> Drawable {
@@ -752,7 +752,7 @@ List<Drawable> Humanoid::render(bool withItems, bool withRotation) {
position = m_identity.personality.armOffset / TilePixels;
} else
image = strf("{}:{}.{}", m_frontArmFrameset, frameBase(m_state), armStateSeq);
- auto drawable = Drawable::makeImage(move(image), 1.0f / TilePixels, true, position);
+ auto drawable = Drawable::makeImage(std::move(image), 1.0f / TilePixels, true, position);
drawable.imagePart().addDirectives(getBodyDirectives(), true);
if (dance.isValid())
drawable.rotate(danceStep->frontArmRotation);
@@ -826,104 +826,104 @@ List<Drawable> Humanoid::renderPortrait(PortraitMode mode) const {
if (mode != PortraitMode::Head) {
if (!m_backArmFrameset.empty()) {
String image = strf("{}:{}", m_backArmFrameset, personality.armIdle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.armOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.armOffset);
drawable.imagePart().addDirectives(getBodyDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (dressed && !m_backSleeveFrameset.empty()) {
String image = strf("{}:{}", m_backSleeveFrameset, personality.armIdle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.armOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.armOffset);
drawable.imagePart().addDirectives(getChestDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (mode != PortraitMode::Bust) {
if (dressed && !m_backArmorFrameset.empty()) {
String image = strf("{}:{}", m_backArmorFrameset, personality.idle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, {});
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, {});
drawable.imagePart().addDirectives(getBackDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
}
}
if (!m_headFrameset.empty()) {
String image = strf("{}:normal", m_headFrameset);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.headOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.headOffset);
drawable.imagePart().addDirectives(getBodyDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_emoteFrameset.empty()) {
String image = strf("{}:{}.{}", m_emoteFrameset, emoteFrameBase(m_emoteState), emoteStateSeq);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.headOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.headOffset);
drawable.imagePart().addDirectives(getEmoteDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_hairFrameset.empty()) {
String image = strf("{}:normal", m_hairFrameset);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.headOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.headOffset);
drawable.imagePart().addDirectives(getHairDirectives(), true).addDirectives(helmetMaskDirective, true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_bodyFrameset.empty()) {
String image = strf("{}:{}", m_bodyFrameset, personality.idle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, {});
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, {});
drawable.imagePart().addDirectives(getBodyDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (mode != PortraitMode::Head) {
if (dressed && !m_legsArmorFrameset.empty()) {
String image = strf("{}:{}", m_legsArmorFrameset, personality.idle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, {});
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, {});
drawable.imagePart().addDirectives(getLegsDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (dressed && !m_chestArmorFrameset.empty()) {
String image = strf("{}:{}", m_chestArmorFrameset, personality.idle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, {});
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, {});
drawable.imagePart().addDirectives(getChestDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
}
if (!m_facialHairFrameset.empty()) {
String image = strf("{}:normal", m_facialHairFrameset);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.headOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.headOffset);
drawable.imagePart().addDirectives(getFacialHairDirectives(), true).addDirectives(helmetMaskDirective, true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (!m_facialMaskFrameset.empty()) {
String image = strf("{}:normal", m_facialMaskFrameset);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.headOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.headOffset);
drawable.imagePart().addDirectives(getFacialMaskDirectives(), true).addDirectives(helmetMaskDirective, true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (dressed && !m_headArmorFrameset.empty()) {
String image = strf("{}:normal", m_headArmorFrameset);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.headOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.headOffset);
drawable.imagePart().addDirectives(getHeadDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (mode != PortraitMode::Head) {
if (!m_frontArmFrameset.empty()) {
String image = strf("{}:{}", m_frontArmFrameset, personality.armIdle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.armOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.armOffset);
drawable.imagePart().addDirectives(getBodyDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
if (dressed && !m_frontSleeveFrameset.empty()) {
String image = strf("{}:{}", m_frontSleeveFrameset, personality.armIdle);
- Drawable drawable = Drawable::makeImage(move(image), 1.0f, true, personality.armOffset);
+ Drawable drawable = Drawable::makeImage(std::move(image), 1.0f, true, personality.armOffset);
drawable.imagePart().addDirectives(getChestDirectives(), true);
- addDrawable(move(drawable));
+ addDrawable(std::move(drawable));
}
}
diff --git a/source/game/StarImageMetadataDatabase.cpp b/source/game/StarImageMetadataDatabase.cpp
index c5ebd84..47ff97f 100644
--- a/source/game/StarImageMetadataDatabase.cpp
+++ b/source/game/StarImageMetadataDatabase.cpp
@@ -136,7 +136,7 @@ AssetPath ImageMetadataDatabase::filterProcessing(AssetPath const& path) {
}
});
- newPath.directives = move(filtered);
+ newPath.directives = std::move(filtered);
return newPath;
}
diff --git a/source/game/StarInput.cpp b/source/game/StarInput.cpp
index 57899bf..8dcf8e9 100644
--- a/source/game/StarInput.cpp
+++ b/source/game/StarInput.cpp
@@ -48,7 +48,7 @@ Json keyModsToJson(KeyMod mod) {
if (bool(mod & KeyMod::AltGr )) array.emplace_back("AltGr" );
if (bool(mod & KeyMod::Scroll)) array.emplace_back("Scroll");
- return array.empty() ? Json() : move(array);
+ return array.empty() ? Json() : std::move(array);
}
// Optional pointer argument to output calculated priority
@@ -146,19 +146,19 @@ Input::Bind Input::bindFromJson(Json const& json) {
KeyBind keyBind;
keyBind.key = KeyNames.getLeft(value.toString());
keyBind.mods = keyModsFromJson(json.getArray("mods", {}), &keyBind.priority);
- bind = move(keyBind);
+ bind = std::move(keyBind);
}
else if (type == "mouse") {
MouseBind mouseBind;
mouseBind.button = MouseButtonNames.getLeft(value.toString());
mouseBind.mods = keyModsFromJson(json.getArray("mods", {}), &mouseBind.priority);
- bind = move(mouseBind);
+ bind = std::move(mouseBind);
}
else if (type == "controller") {
ControllerBind controllerBind;
controllerBind.button = ControllerButtonNames.getLeft(value.toString());
controllerBind.controller = json.getUInt("controller", 0);
- bind = move(controllerBind);
+ bind = std::move(controllerBind);
}
return bind;
@@ -171,8 +171,8 @@ Json Input::bindToJson(Bind const& bind) {
{"value", KeyNames.getRight(keyBind->key)}
}; // don't want empty mods to exist as null entry
if (auto mods = keyModsToJson(keyBind->mods))
- obj.emplace("mods", move(mods));
- return move(obj);
+ obj.emplace("mods", std::move(mods));
+ return std::move(obj);
}
else if (auto mouseBind = bind.ptr<MouseBind>()) {
auto obj = JsonObject{
@@ -180,8 +180,8 @@ Json Input::bindToJson(Bind const& bind) {
{"value", MouseButtonNames.getRight(mouseBind->button)}
};
if (auto mods = keyModsToJson(mouseBind->mods))
- obj.emplace("mods", move(mods));
- return move(obj);
+ obj.emplace("mods", std::move(mods));
+ return std::move(obj);
}
else if (auto controllerBind = bind.ptr<ControllerBind>()) {
return JsonObject{
@@ -219,7 +219,7 @@ void Input::BindEntry::updated() {
String path = strf("{}.{}", InputBindingConfigRoot, category->id);
if (!config->getPath(path).isType(Json::Type::Object)) {
config->setPath(path, JsonObject{
- { id, move(array) }
+ { id, std::move(array) }
});
}
else {
@@ -577,7 +577,7 @@ Json Input::getDefaultBinds(String const& categoryId, String const& bindId) {
for (Bind const& bind : bindEntry(categoryId, bindId).defaultBinds)
array.emplace_back(bindToJson(bind));
- return move(array);
+ return std::move(array);
}
Json Input::getBinds(String const& categoryId, String const& bindId) {
@@ -585,7 +585,7 @@ Json Input::getBinds(String const& categoryId, String const& bindId) {
for (Bind const& bind : bindEntry(categoryId, bindId).customBinds)
array.emplace_back(bindToJson(bind));
- return move(array);
+ return std::move(array);
}
void Input::setBinds(String const& categoryId, String const& bindId, Json const& jBinds) {
@@ -595,7 +595,7 @@ void Input::setBinds(String const& categoryId, String const& bindId, Json const&
for (Json const& jBind : jBinds.toArray())
binds.emplace_back(bindFromJson(jBind));
- entry.customBinds = move(binds);
+ entry.customBinds = std::move(binds);
entry.updated();
}
diff --git a/source/game/StarItem.cpp b/source/game/StarItem.cpp
index f920a64..bac5f0b 100644
--- a/source/game/StarItem.cpp
+++ b/source/game/StarItem.cpp
@@ -9,9 +9,9 @@
namespace Star {
Item::Item(Json config, String directory, Json parameters) {
- m_config = move(config);
- m_directory = move(directory);
- m_parameters = move(parameters);
+ m_config = std::move(config);
+ m_directory = std::move(directory);
+ m_parameters = std::move(parameters);
m_name = m_config.getString("itemName");
m_count = 1;
@@ -33,7 +33,7 @@ Item::Item(Json config, String directory, Json parameters) {
iconDrawables.emplaceAppend(drawable);
}
}
- setIconDrawables(move(iconDrawables));
+ setIconDrawables(std::move(iconDrawables));
} else {
auto image = AssetPath::relativeTo(m_directory, inventoryIcon.toString());
setIconDrawables({Drawable::makeImage(image, 1.0f, true, Vec2F())});
@@ -214,7 +214,7 @@ void Item::setPrice(uint64_t price) {
}
void Item::setIconDrawables(List<Drawable> drawables) {
- m_iconDrawables = move(drawables);
+ m_iconDrawables = std::move(drawables);
auto boundBox = Drawable::boundBoxAll(m_iconDrawables, true);
if (!boundBox.isEmpty()) {
for (auto& drawable : m_iconDrawables)
diff --git a/source/game/StarItemBag.cpp b/source/game/StarItemBag.cpp
index 0314f16..8abdd6f 100644
--- a/source/game/StarItemBag.cpp
+++ b/source/game/StarItemBag.cpp
@@ -100,7 +100,7 @@ List<ItemPtr> ItemBag::takeAll() {
List<ItemPtr> taken;
for (size_t i = 0; i < size(); ++i) {
if (auto& item = at(i))
- taken.append(move(item));
+ taken.append(std::move(item));
}
return taken;
}
@@ -271,7 +271,7 @@ ItemPtr ItemBag::addItems(ItemPtr items) {
if (items->empty())
return {};
} else {
- storedItem = move(items);
+ storedItem = std::move(items);
return {};
}
}
@@ -292,7 +292,7 @@ ItemPtr ItemBag::stackItems(ItemPtr items) {
if (items->empty())
return {};
} else {
- storedItem = move(items);
+ storedItem = std::move(items);
return {};
}
}
diff --git a/source/game/StarItemDatabase.cpp b/source/game/StarItemDatabase.cpp
index 4a72ab5..0eccb2e 100644
--- a/source/game/StarItemDatabase.cpp
+++ b/source/game/StarItemDatabase.cpp
@@ -228,7 +228,7 @@ ItemPtr ItemDatabase::itemShared(ItemDescriptor descriptor, Maybe<float> level,
get<2>(entry) = item->parameters().optUInt("seed"); // Seed could've been changed by the buildscript
locker.lock();
- return m_itemCache.get(entry, [&](ItemCacheEntry const&) -> ItemPtr { return move(item); });
+ return m_itemCache.get(entry, [&](ItemCacheEntry const&) -> ItemPtr { return std::move(item); });
}
}
@@ -521,10 +521,10 @@ ItemDatabase::ItemData const& ItemDatabase::itemData(String const& name) const {
ItemRecipe ItemDatabase::makeRecipe(List<ItemDescriptor> inputs, ItemDescriptor output, float duration, StringSet groups) const {
ItemRecipe res;
- res.inputs = move(inputs);
- res.output = move(output);
+ res.inputs = std::move(inputs);
+ res.output = std::move(output);
res.duration = duration;
- res.groups = move(groups);
+ res.groups = std::move(groups);
if (auto item = ItemDatabase::itemShared(res.output)) {
res.outputRarity = item->rarity();
res.guiFilterString = guiFilterString(item);
@@ -585,12 +585,12 @@ void ItemDatabase::addObjectDropItem(String const& objectPath, Json const& objec
// execute scripts intended for objects
customConfig.remove("scripts");
- data.customConfig = move(customConfig);
+ data.customConfig = std::move(customConfig);
if (m_items.contains(data.name))
throw ItemException(strf("Object drop '{}' shares name with existing item", data.name));
- m_items[data.name] = move(data);
+ m_items[data.name] = std::move(data);
}
void ItemDatabase::scanItems() {
@@ -694,7 +694,7 @@ void ItemDatabase::addBlueprints() {
configInfo["price"] = baseItem->price();
- blueprintData.customConfig = move(configInfo);
+ blueprintData.customConfig = std::move(configInfo);
blueprintData.directory = itemData(baseDesc.name()).directory;
m_items[blueprintData.name] = blueprintData;
diff --git a/source/game/StarItemDescriptor.cpp b/source/game/StarItemDescriptor.cpp
index 81f1464..ecc7a59 100644
--- a/source/game/StarItemDescriptor.cpp
+++ b/source/game/StarItemDescriptor.cpp
@@ -8,7 +8,7 @@ namespace Star {
ItemDescriptor::ItemDescriptor() : m_count(0), m_parameters(JsonObject()) {}
ItemDescriptor::ItemDescriptor(String name, uint64_t count, Json parameters)
- : m_name(move(name)), m_count(count), m_parameters(move(parameters)) {
+ : m_name(std::move(name)), m_count(count), m_parameters(std::move(parameters)) {
if (m_parameters.isNull())
m_parameters = JsonObject();
if (!m_parameters.isType(Json::Type::Object))
@@ -122,7 +122,7 @@ Json ItemDescriptor::toJson() const {
}
ItemDescriptor::ItemDescriptor(String name, uint64_t count, Json parameters, Maybe<size_t> parametersHash)
- : m_name(move(name)), m_count(count), m_parameters(move(parameters)), m_parametersHash(parametersHash) {}
+ : m_name(std::move(name)), m_count(count), m_parameters(std::move(parameters)), m_parametersHash(parametersHash) {}
size_t ItemDescriptor::parametersHash() const {
if (!m_parametersHash)
diff --git a/source/game/StarItemDrop.cpp b/source/game/StarItemDrop.cpp
index fa3c984..e7eec81 100644
--- a/source/game/StarItemDrop.cpp
+++ b/source/game/StarItemDrop.cpp
@@ -69,7 +69,7 @@ ItemDropPtr ItemDrop::throwDrop(ItemDescriptor const& itemDescriptor, Vec2F cons
ItemDrop::ItemDrop(ItemPtr item)
: ItemDrop() {
- m_item = move(item);
+ m_item = std::move(item);
updateCollisionPoly();
@@ -94,7 +94,7 @@ ItemDrop::ItemDrop(Json const& diskStore)
ItemDrop::ItemDrop(ByteArray store)
: ItemDrop() {
- DataStreamBuffer ds(move(store));
+ DataStreamBuffer ds(std::move(store));
Root::singleton().itemDatabase()->loadItem(ds.read<ItemDescriptor>(), m_item);
ds.read(m_eternal);
@@ -151,7 +151,7 @@ pair<ByteArray, uint64_t> ItemDrop::writeNetState(uint64_t fromVersion) {
}
void ItemDrop::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void ItemDrop::enableInterpolation(float extrapolationHint) {
@@ -292,7 +292,7 @@ void ItemDrop::render(RenderCallback* renderCallback) {
auto drawable = Drawable::makeLine(line, width, beamColor, position());
(drawable.linePart().endColor = beamColor)->setAlphaF(0.0f);
drawable.fullbright = true;
- renderCallback->addDrawable(move(drawable), RenderLayerItemDrop);
+ renderCallback->addDrawable(std::move(drawable), RenderLayerItemDrop);
}
if (!m_drawables) {
@@ -314,7 +314,7 @@ void ItemDrop::render(RenderCallback* renderCallback) {
Vec2F dropPosition = position();
for (Drawable drawable : *m_drawables) {
drawable.position += dropPosition;
- renderCallback->addDrawable(move(drawable), renderLayer);
+ renderCallback->addDrawable(std::move(drawable), renderLayer);
}
}
@@ -323,7 +323,7 @@ void ItemDrop::renderLightSources(RenderCallback* renderCallback) {
light.pointLight = false;
light.color = Vec3B::filled(20);
light.position = position();
- renderCallback->addLightSource(move(light));
+ renderCallback->addLightSource(std::move(light));
}
diff --git a/source/game/StarMaterialRenderProfile.cpp b/source/game/StarMaterialRenderProfile.cpp
index a763f61..975e7fa 100644
--- a/source/game/StarMaterialRenderProfile.cpp
+++ b/source/game/StarMaterialRenderProfile.cpp
@@ -33,7 +33,7 @@ MaterialRenderMatchList parseMaterialRenderMatchList(Json const& matchSpec, Rule
throw MaterialRenderProfileException(strf("Match position {} outside of maximum rule distance {}",
matchPoint.position, MaterialRenderProfileMaxNeighborDistance));
matchPoint.rule = ruleMap.get(matchPointConfig.getString(1));
- match->matchPoints.append(move(matchPoint));
+ match->matchPoints.append(std::move(matchPoint));
}
for (auto const& piece : matchConfig.getArray("pieces", {}))
@@ -105,7 +105,7 @@ MaterialRenderProfile parseMaterialRenderProfile(Json const& spec, String const&
rule->entries.append({MaterialRule::RulePropertyEquals{ruleEntry.getString("propertyName"), ruleEntry.get("propertyValue")}, inverse});
}
}
- profile.rules[pair.first] = move(rule);
+ profile.rules[pair.first] = std::move(rule);
}
for (auto const& pair : spec.get("pieces").iterateObject()) {
@@ -137,7 +137,7 @@ MaterialRenderProfile parseMaterialRenderProfile(Json const& spec, String const&
}
}
- profile.pieces[pair.first] = move(renderPiece);
+ profile.pieces[pair.first] = std::move(renderPiece);
}
for (auto const& pair : spec.get("matches").iterateArray())
diff --git a/source/game/StarMonster.cpp b/source/game/StarMonster.cpp
index 7e4e399..075235f 100644
--- a/source/game/StarMonster.cpp
+++ b/source/game/StarMonster.cpp
@@ -215,7 +215,7 @@ pair<ByteArray, uint64_t> Monster::writeNetState(uint64_t fromVersion) {
}
void Monster::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void Monster::enableInterpolation(float extrapolationHint) {
@@ -490,7 +490,7 @@ void Monster::render(RenderCallback* renderCallback) {
for (auto& drawable : m_networkedAnimator.drawables(position())) {
if (drawable.isImage())
drawable.imagePart().addDirectivesGroup(m_statusController->parentDirectives(), true);
- renderCallback->addDrawable(move(drawable), m_monsterVariant.renderLayer);
+ renderCallback->addDrawable(std::move(drawable), m_monsterVariant.renderLayer);
}
renderCallback->addAudios(m_networkedAnimatorDynamicTarget.pullNewAudios());
@@ -593,7 +593,7 @@ LuaCallbacks Monster::makeMonsterCallbacks() {
});
callbacks.registerCallback("setDropPool", [this](Json dropPool) {
- m_dropPool = move(dropPool);
+ m_dropPool = std::move(dropPool);
});
callbacks.registerCallback("toAbsolutePosition", [this](Vec2F const& p) {
@@ -671,7 +671,7 @@ LuaCallbacks Monster::makeMonsterCallbacks() {
});
callbacks.registerCallback("setAnimationParameter", [this](String name, Json value) {
- m_scriptedAnimationParameters.set(move(name), move(value));
+ m_scriptedAnimationParameters.set(std::move(name), std::move(value));
});
return callbacks;
diff --git a/source/game/StarMonsterDatabase.cpp b/source/game/StarMonsterDatabase.cpp
index 4f6359f..395d873 100644
--- a/source/game/StarMonsterDatabase.cpp
+++ b/source/game/StarMonsterDatabase.cpp
@@ -288,11 +288,11 @@ Json MonsterDatabase::mergePartParameters(Json const& partParameterDescription,
if (pair.second.type() == Json::Type::Array) {
auto array = value.toArray();
array.appendAll(pair.second.toArray());
- value = move(array);
+ value = std::move(array);
} else if (pair.second.type() == Json::Type::Object) {
auto obj = value.toObject();
obj.merge(pair.second.toObject(), true);
- value = move(obj);
+ value = std::move(obj);
}
}
}
@@ -319,7 +319,7 @@ Json MonsterDatabase::mergeFinalParameters(JsonArray const& parameters) {
|| pair.first == "baseSkills") {
auto array = value.optArray().value();
array.appendAll(pair.second.optArray().value());
- value = move(array);
+ value = std::move(array);
} else {
value = jsonMerge(value, pair.second);
}
diff --git a/source/game/StarMovementController.cpp b/source/game/StarMovementController.cpp
index a9b626f..88ac69f 100644
--- a/source/game/StarMovementController.cpp
+++ b/source/game/StarMovementController.cpp
@@ -721,7 +721,7 @@ void MovementController::forEachMovingCollision(RectF const& region, function<bo
for (size_t i = 0; i < physicsEntity->movingCollisionCount(); ++i) {
if (auto mc = physicsEntity->movingCollision(i)) {
if (mc->categoryFilter.check(m_parameters.physicsEffectCategories.value())) {
- PolyF poly = move(mc->collision);
+ PolyF poly = std::move(mc->collision);
poly.translate(geometry.nearestTo(region.min(), mc->position));
RectF polyBounds = poly.boundBox();
@@ -1055,7 +1055,7 @@ MovementController::CollisionSeparation MovementController::collisionSeparate(Li
}
void MovementController::updateParameters(MovementParameters parameters) {
- m_parameters = move(parameters);
+ m_parameters = std::move(parameters);
m_collisionPoly.set(*m_parameters.collisionPoly);
m_mass.set(*m_parameters.mass);
updatePositionInterpolators();
@@ -1106,7 +1106,7 @@ void MovementController::queryCollisions(RectF const& region) {
forEachMovingCollision(region, [&](MovingCollisionId id, PhysicsMovingCollision mc, PolyF poly, RectF bounds) {
CollisionPoly& collisionPoly = newCollisionPoly();
- collisionPoly.poly = move(poly);
+ collisionPoly.poly = std::move(poly);
collisionPoly.polyBounds = bounds;
collisionPoly.sortPosition = collisionPoly.poly.center();
collisionPoly.movingCollisionId = id;
diff --git a/source/game/StarNetPacketSocket.cpp b/source/game/StarNetPacketSocket.cpp
index e2bd629..48b2082 100644
--- a/source/game/StarNetPacketSocket.cpp
+++ b/source/game/StarNetPacketSocket.cpp
@@ -96,7 +96,7 @@ void LocalPacketSocket::sendPackets(List<PacketPtr> packets) {
}
#endif
- outgoingPipe->queue.appendAll(move(packets));
+ outgoingPipe->queue.appendAll(std::move(packets));
}
}
@@ -120,12 +120,12 @@ bool LocalPacketSocket::readData() {
}
LocalPacketSocket::LocalPacketSocket(shared_ptr<Pipe> incomingPipe, weak_ptr<Pipe> outgoingPipe)
- : m_incomingPipe(move(incomingPipe)), m_outgoingPipe(move(outgoingPipe)) {}
+ : m_incomingPipe(std::move(incomingPipe)), m_outgoingPipe(std::move(outgoingPipe)) {}
TcpPacketSocketUPtr TcpPacketSocket::open(TcpSocketPtr socket) {
socket->setNoDelay(true);
socket->setNonBlocking(true);
- return TcpPacketSocketUPtr(new TcpPacketSocket(move(socket)));
+ return TcpPacketSocketUPtr(new TcpPacketSocket(std::move(socket)));
}
bool TcpPacketSocket::isOpen() const {
@@ -217,7 +217,7 @@ List<PacketPtr> TcpPacketSocket::receivePackets() {
m_incomingStats.mix(packetType, packetSize);
- DataStreamBuffer packetStream(move(packetBytes));
+ DataStreamBuffer packetStream(std::move(packetBytes));
do {
PacketPtr packet = createPacket(packetType);
packet->setCompressionMode(packetCompressed ? PacketCompressionMode::Enabled : PacketCompressionMode::Disabled);
@@ -225,7 +225,7 @@ List<PacketPtr> TcpPacketSocket::receivePackets() {
packet->readLegacy(packetStream);
else
packet->read(packetStream);
- packets.append(move(packet));
+ packets.append(std::move(packet));
} while (!packetStream.atEnd());
m_inputBuffer = ds.readBytes(ds.size() - ds.pos());
@@ -296,10 +296,10 @@ Maybe<PacketStats> TcpPacketSocket::outgoingStats() const {
}
TcpPacketSocket::TcpPacketSocket(TcpSocketPtr socket)
- : m_socket(move(socket)) {}
+ : m_socket(std::move(socket)) {}
P2PPacketSocketUPtr P2PPacketSocket::open(P2PSocketUPtr socket) {
- return P2PPacketSocketUPtr(new P2PPacketSocket(move(socket)));
+ return P2PPacketSocketUPtr(new P2PPacketSocket(std::move(socket)));
}
bool P2PPacketSocket::isOpen() const {
@@ -357,7 +357,7 @@ List<PacketPtr> P2PPacketSocket::receivePackets() {
List<PacketPtr> packets;
try {
for (auto& inputMessage : take(m_inputMessages)) {
- DataStreamBuffer ds(move(inputMessage));
+ DataStreamBuffer ds(std::move(inputMessage));
PacketType packetType = ds.read<PacketType>();
bool packetCompressed = ds.read<bool>();
@@ -369,7 +369,7 @@ List<PacketPtr> P2PPacketSocket::receivePackets() {
m_incomingStats.mix(packetType, packetSize);
- DataStreamBuffer packetStream(move(packetBytes));
+ DataStreamBuffer packetStream(std::move(packetBytes));
do {
PacketPtr packet = createPacket(packetType);
packet->setCompressionMode(packetCompressed ? PacketCompressionMode::Enabled : PacketCompressionMode::Disabled);
@@ -377,7 +377,7 @@ List<PacketPtr> P2PPacketSocket::receivePackets() {
packet->readLegacy(packetStream);
else
packet->read(packetStream);
- packets.append(move(packet));
+ packets.append(std::move(packet));
} while (!packetStream.atEnd());
}
} catch (IOException const& e) {
@@ -430,6 +430,6 @@ Maybe<PacketStats> P2PPacketSocket::outgoingStats() const {
}
P2PPacketSocket::P2PPacketSocket(P2PSocketPtr socket)
- : m_socket(move(socket)) {}
+ : m_socket(std::move(socket)) {}
}
diff --git a/source/game/StarNetPackets.cpp b/source/game/StarNetPackets.cpp
index 0ccb66e..f787b1c 100644
--- a/source/game/StarNetPackets.cpp
+++ b/source/game/StarNetPackets.cpp
@@ -196,7 +196,7 @@ ConnectSuccessPacket::ConnectSuccessPacket() {}
ConnectSuccessPacket::ConnectSuccessPacket(
ConnectionId clientId, Uuid serverUuid, CelestialBaseInformation celestialInformation)
- : clientId(clientId), serverUuid(move(serverUuid)), celestialInformation(move(celestialInformation)) {}
+ : clientId(clientId), serverUuid(std::move(serverUuid)), celestialInformation(std::move(celestialInformation)) {}
void ConnectSuccessPacket::read(DataStream& ds) {
ds.vuread(clientId);
@@ -212,7 +212,7 @@ void ConnectSuccessPacket::write(DataStream& ds) const {
ConnectFailurePacket::ConnectFailurePacket() {}
-ConnectFailurePacket::ConnectFailurePacket(String reason) : reason(move(reason)) {}
+ConnectFailurePacket::ConnectFailurePacket(String reason) : reason(std::move(reason)) {}
void ConnectFailurePacket::read(DataStream& ds) {
ds.read(reason);
@@ -262,7 +262,7 @@ void UniverseTimeUpdatePacket::write(DataStream& ds) const {
CelestialResponsePacket::CelestialResponsePacket() {}
-CelestialResponsePacket::CelestialResponsePacket(List<CelestialResponse> responses) : responses(move(responses)) {}
+CelestialResponsePacket::CelestialResponsePacket(List<CelestialResponse> responses) : responses(std::move(responses)) {}
void CelestialResponsePacket::read(DataStream& ds) {
ds.read(responses);
@@ -275,7 +275,7 @@ void CelestialResponsePacket::write(DataStream& ds) const {
PlayerWarpResultPacket::PlayerWarpResultPacket() : warpActionInvalid(false) {}
PlayerWarpResultPacket::PlayerWarpResultPacket(bool success, WarpAction warpAction, bool warpActionInvalid)
- : success(success), warpAction(move(warpAction)), warpActionInvalid(warpActionInvalid) {}
+ : success(success), warpAction(std::move(warpAction)), warpActionInvalid(warpActionInvalid) {}
void PlayerWarpResultPacket::read(DataStream& ds) {
ds.read(success);
@@ -304,7 +304,7 @@ void PlanetTypeUpdatePacket::write(DataStream& ds) const {
PausePacket::PausePacket() {}
-PausePacket::PausePacket(bool pause) : pause(move(pause)) {}
+PausePacket::PausePacket(bool pause) : pause(std::move(pause)) {}
void PausePacket::read(DataStream& ds) {
ds.read(pause);
@@ -337,9 +337,9 @@ ClientConnectPacket::ClientConnectPacket() {}
ClientConnectPacket::ClientConnectPacket(ByteArray assetsDigest, bool allowAssetsMismatch, Uuid playerUuid,
String playerName, String playerSpecies, WorldChunks shipChunks, ShipUpgrades shipUpgrades,
bool introComplete, String account)
- : assetsDigest(move(assetsDigest)), allowAssetsMismatch(allowAssetsMismatch), playerUuid(move(playerUuid)),
- playerName(move(playerName)), playerSpecies(move(playerSpecies)), shipChunks(move(shipChunks)),
- shipUpgrades(move(shipUpgrades)), introComplete(move(introComplete)), account(move(account)) {}
+ : assetsDigest(std::move(assetsDigest)), allowAssetsMismatch(allowAssetsMismatch), playerUuid(std::move(playerUuid)),
+ playerName(std::move(playerName)), playerSpecies(std::move(playerSpecies)), shipChunks(std::move(shipChunks)),
+ shipUpgrades(std::move(shipUpgrades)), introComplete(std::move(introComplete)), account(std::move(account)) {}
void ClientConnectPacket::read(DataStream& ds) {
ds.read(assetsDigest);
@@ -391,7 +391,7 @@ void HandshakeResponsePacket::write(DataStream& ds) const {
PlayerWarpPacket::PlayerWarpPacket() {}
-PlayerWarpPacket::PlayerWarpPacket(WarpAction action, bool deploy) : action(move(action)), deploy(move(deploy)) {}
+PlayerWarpPacket::PlayerWarpPacket(WarpAction action, bool deploy) : action(std::move(action)), deploy(std::move(deploy)) {}
void PlayerWarpPacket::read(DataStream& ds) {
ds.read(action);
@@ -405,7 +405,7 @@ void PlayerWarpPacket::write(DataStream& ds) const {
FlyShipPacket::FlyShipPacket() {}
-FlyShipPacket::FlyShipPacket(Vec3I system, SystemLocation location) : system(move(system)), location(move(location)) {}
+FlyShipPacket::FlyShipPacket(Vec3I system, SystemLocation location) : system(std::move(system)), location(std::move(location)) {}
void FlyShipPacket::read(DataStream& ds) {
ds.read(system);
@@ -419,7 +419,7 @@ void FlyShipPacket::write(DataStream& ds) const {
ChatSendPacket::ChatSendPacket() : sendMode(ChatSendMode::Broadcast) {}
-ChatSendPacket::ChatSendPacket(String text, ChatSendMode sendMode) : text(move(text)), sendMode(sendMode) {}
+ChatSendPacket::ChatSendPacket(String text, ChatSendMode sendMode) : text(std::move(text)), sendMode(sendMode) {}
void ChatSendPacket::read(DataStream& ds) {
ds.read(text);
@@ -433,7 +433,7 @@ void ChatSendPacket::write(DataStream& ds) const {
CelestialRequestPacket::CelestialRequestPacket() {}
-CelestialRequestPacket::CelestialRequestPacket(List<CelestialRequest> requests) : requests(move(requests)) {}
+CelestialRequestPacket::CelestialRequestPacket(List<CelestialRequest> requests) : requests(std::move(requests)) {}
void CelestialRequestPacket::read(DataStream& ds) {
ds.read(requests);
@@ -445,7 +445,7 @@ void CelestialRequestPacket::write(DataStream& ds) const {
ClientContextUpdatePacket::ClientContextUpdatePacket() {}
-ClientContextUpdatePacket::ClientContextUpdatePacket(ByteArray updateData) : updateData(move(updateData)) {}
+ClientContextUpdatePacket::ClientContextUpdatePacket(ByteArray updateData) : updateData(std::move(updateData)) {}
void ClientContextUpdatePacket::read(DataStream& ds) {
ds.read(updateData);
@@ -525,7 +525,7 @@ void WorldParametersUpdatePacket::write(DataStream& ds) const {
CentralStructureUpdatePacket::CentralStructureUpdatePacket() {}
-CentralStructureUpdatePacket::CentralStructureUpdatePacket(Json structureData) : structureData(move(structureData)) {}
+CentralStructureUpdatePacket::CentralStructureUpdatePacket(Json structureData) : structureData(std::move(structureData)) {}
void CentralStructureUpdatePacket::read(DataStream& ds) {
ds.read(structureData);
@@ -639,7 +639,7 @@ void GiveItemPacket::write(DataStream& ds) const {
EnvironmentUpdatePacket::EnvironmentUpdatePacket() {}
EnvironmentUpdatePacket::EnvironmentUpdatePacket(ByteArray skyDelta, ByteArray weatherDelta)
- : skyDelta(move(skyDelta)), weatherDelta(move(weatherDelta)) {}
+ : skyDelta(std::move(skyDelta)), weatherDelta(std::move(weatherDelta)) {}
void EnvironmentUpdatePacket::read(DataStream& ds) {
ds.read(skyDelta);
@@ -670,7 +670,7 @@ DamageTileGroupPacket::DamageTileGroupPacket() : layer(TileLayer::Foreground) {}
DamageTileGroupPacket::DamageTileGroupPacket(
List<Vec2I> tilePositions, TileLayer layer, Vec2F sourcePosition, TileDamage tileDamage, Maybe<EntityId> sourceEntity)
- : tilePositions(move(tilePositions)), layer(layer), sourcePosition(sourcePosition), tileDamage(move(tileDamage)), sourceEntity(move(sourceEntity)) {}
+ : tilePositions(std::move(tilePositions)), layer(layer), sourcePosition(sourcePosition), tileDamage(std::move(tileDamage)), sourceEntity(std::move(sourceEntity)) {}
void DamageTileGroupPacket::read(DataStream& ds) {
ds.readContainer(tilePositions);
@@ -691,7 +691,7 @@ void DamageTileGroupPacket::write(DataStream& ds) const {
CollectLiquidPacket::CollectLiquidPacket() {}
CollectLiquidPacket::CollectLiquidPacket(List<Vec2I> tilePositions, LiquidId liquidId)
- : tilePositions(move(tilePositions)), liquidId(liquidId) {}
+ : tilePositions(std::move(tilePositions)), liquidId(liquidId) {}
void CollectLiquidPacket::read(DataStream& ds) {
ds.readContainer(tilePositions);
@@ -720,7 +720,7 @@ void RequestDropPacket::write(DataStream& ds) const {
SpawnEntityPacket::SpawnEntityPacket() {}
SpawnEntityPacket::SpawnEntityPacket(EntityType entityType, ByteArray storeData, ByteArray firstNetState)
- : entityType(entityType), storeData(move(storeData)), firstNetState(move(firstNetState)) {}
+ : entityType(entityType), storeData(std::move(storeData)), firstNetState(std::move(firstNetState)) {}
void SpawnEntityPacket::read(DataStream& ds) {
ds.read(entityType);
@@ -772,7 +772,7 @@ EntityCreatePacket::EntityCreatePacket() {
ServerDisconnectPacket::ServerDisconnectPacket() {}
-ServerDisconnectPacket::ServerDisconnectPacket(String reason) : reason(move(reason)) {}
+ServerDisconnectPacket::ServerDisconnectPacket(String reason) : reason(std::move(reason)) {}
void ServerDisconnectPacket::read(DataStream& ds) {
ds.read(reason);
@@ -830,7 +830,7 @@ void WorldClientStateUpdatePacket::write(DataStream& ds) const {
FindUniqueEntityPacket::FindUniqueEntityPacket() {}
FindUniqueEntityPacket::FindUniqueEntityPacket(String uniqueEntityId)
- : uniqueEntityId(move(uniqueEntityId)) {}
+ : uniqueEntityId(std::move(uniqueEntityId)) {}
void FindUniqueEntityPacket::read(DataStream& ds) {
ds.read(uniqueEntityId);
@@ -865,7 +865,7 @@ void PingPacket::write(DataStream& ds) const {
}
EntityCreatePacket::EntityCreatePacket(EntityType entityType, ByteArray storeData, ByteArray firstNetState, EntityId entityId)
- : entityType(entityType), storeData(move(storeData)), firstNetState(move(firstNetState)), entityId(entityId) {}
+ : entityType(entityType), storeData(std::move(storeData)), firstNetState(std::move(firstNetState)), entityId(entityId) {}
void EntityCreatePacket::read(DataStream& ds) {
ds.read(entityType);
@@ -906,7 +906,7 @@ EntityDestroyPacket::EntityDestroyPacket() {
}
EntityDestroyPacket::EntityDestroyPacket(EntityId entityId, ByteArray finalNetState, bool death)
- : entityId(entityId), finalNetState(move(finalNetState)), death(death) {}
+ : entityId(entityId), finalNetState(std::move(finalNetState)), death(death) {}
void EntityDestroyPacket::read(DataStream& ds) {
ds.viread(entityId);
@@ -922,7 +922,7 @@ void EntityDestroyPacket::write(DataStream& ds) const {
HitRequestPacket::HitRequestPacket() {}
-HitRequestPacket::HitRequestPacket(RemoteHitRequest remoteHitRequest) : remoteHitRequest(move(remoteHitRequest)) {}
+HitRequestPacket::HitRequestPacket(RemoteHitRequest remoteHitRequest) : remoteHitRequest(std::move(remoteHitRequest)) {}
void HitRequestPacket::read(DataStream& ds) {
ds.read(remoteHitRequest);
@@ -935,7 +935,7 @@ void HitRequestPacket::write(DataStream& ds) const {
DamageRequestPacket::DamageRequestPacket() {}
DamageRequestPacket::DamageRequestPacket(RemoteDamageRequest remoteDamageRequest)
- : remoteDamageRequest(move(remoteDamageRequest)) {}
+ : remoteDamageRequest(std::move(remoteDamageRequest)) {}
void DamageRequestPacket::read(DataStream& ds) {
ds.read(remoteDamageRequest);
@@ -948,7 +948,7 @@ void DamageRequestPacket::write(DataStream& ds) const {
DamageNotificationPacket::DamageNotificationPacket() {}
DamageNotificationPacket::DamageNotificationPacket(RemoteDamageNotification remoteDamageNotification)
- : remoteDamageNotification(move(remoteDamageNotification)) {}
+ : remoteDamageNotification(std::move(remoteDamageNotification)) {}
void DamageNotificationPacket::read(DataStream& ds) {
ds.read(remoteDamageNotification);
@@ -961,7 +961,7 @@ void DamageNotificationPacket::write(DataStream& ds) const {
EntityMessagePacket::EntityMessagePacket() {}
EntityMessagePacket::EntityMessagePacket(Variant<EntityId, String> entityId, String message, JsonArray args, Uuid uuid, ConnectionId fromConnection)
- : entityId(entityId), message(move(message)), args(move(args)), uuid(uuid), fromConnection(fromConnection) {}
+ : entityId(entityId), message(std::move(message)), args(std::move(args)), uuid(uuid), fromConnection(fromConnection) {}
void EntityMessagePacket::read(DataStream& ds) {
ds.read(entityId);
@@ -982,7 +982,7 @@ void EntityMessagePacket::write(DataStream& ds) const {
EntityMessageResponsePacket::EntityMessageResponsePacket() {}
EntityMessageResponsePacket::EntityMessageResponsePacket(Either<String, Json> response, Uuid uuid)
- : response(move(response)), uuid(uuid) {}
+ : response(std::move(response)), uuid(uuid) {}
void EntityMessageResponsePacket::read(DataStream& ds) {
ds.read(response);
@@ -1025,7 +1025,7 @@ void UpdateTileProtectionPacket::write(DataStream& ds) const {
SetDungeonGravityPacket::SetDungeonGravityPacket() {}
SetDungeonGravityPacket::SetDungeonGravityPacket(DungeonId dungeonId, Maybe<float> gravity)
- : dungeonId(move(dungeonId)), gravity(move(gravity)) {}
+ : dungeonId(std::move(dungeonId)), gravity(std::move(gravity)) {}
void SetDungeonGravityPacket::read(DataStream& ds) {
ds.read(dungeonId);
@@ -1040,7 +1040,7 @@ void SetDungeonGravityPacket::write(DataStream& ds) const {
SetDungeonBreathablePacket::SetDungeonBreathablePacket() {}
SetDungeonBreathablePacket::SetDungeonBreathablePacket(DungeonId dungeonId, Maybe<bool> breathable)
- : dungeonId(move(dungeonId)), breathable(move(breathable)) {}
+ : dungeonId(std::move(dungeonId)), breathable(std::move(breathable)) {}
void SetDungeonBreathablePacket::read(DataStream& ds) {
ds.read(dungeonId);
@@ -1069,7 +1069,7 @@ void SetPlayerStartPacket::write(DataStream& ds) const {
FindUniqueEntityResponsePacket::FindUniqueEntityResponsePacket() {}
FindUniqueEntityResponsePacket::FindUniqueEntityResponsePacket(String uniqueEntityId, Maybe<Vec2F> entityPosition)
- : uniqueEntityId(move(uniqueEntityId)), entityPosition(move(entityPosition)) {}
+ : uniqueEntityId(std::move(uniqueEntityId)), entityPosition(std::move(entityPosition)) {}
void FindUniqueEntityResponsePacket::read(DataStream& ds) {
ds.read(uniqueEntityId);
@@ -1108,7 +1108,7 @@ void StepUpdatePacket::write(DataStream& ds) const {
SystemWorldStartPacket::SystemWorldStartPacket() {}
SystemWorldStartPacket::SystemWorldStartPacket(Vec3I location, List<ByteArray> objectStores, List<ByteArray> shipStores, pair<Uuid, SystemLocation> clientShip)
- : location(move(location)), objectStores(move(objectStores)), shipStores(move(shipStores)), clientShip(move(clientShip)) {}
+ : location(std::move(location)), objectStores(std::move(objectStores)), shipStores(std::move(shipStores)), clientShip(std::move(clientShip)) {}
void SystemWorldStartPacket::read(DataStream& ds) {
ds.read(location);
@@ -1127,7 +1127,7 @@ void SystemWorldStartPacket::write(DataStream& ds) const {
SystemWorldUpdatePacket::SystemWorldUpdatePacket() {}
SystemWorldUpdatePacket::SystemWorldUpdatePacket(HashMap<Uuid, ByteArray> objectUpdates, HashMap<Uuid, ByteArray> shipUpdates)
- : objectUpdates(move(objectUpdates)), shipUpdates(move(shipUpdates)) {}
+ : objectUpdates(std::move(objectUpdates)), shipUpdates(std::move(shipUpdates)) {}
void SystemWorldUpdatePacket::read(DataStream& ds) {
ds.read(objectUpdates);
@@ -1141,7 +1141,7 @@ void SystemWorldUpdatePacket::write(DataStream& ds) const {
SystemObjectCreatePacket::SystemObjectCreatePacket() {}
-SystemObjectCreatePacket::SystemObjectCreatePacket(ByteArray objectStore) : objectStore(move(objectStore)) {}
+SystemObjectCreatePacket::SystemObjectCreatePacket(ByteArray objectStore) : objectStore(std::move(objectStore)) {}
void SystemObjectCreatePacket::read(DataStream& ds) {
ds.read(objectStore);
@@ -1153,7 +1153,7 @@ void SystemObjectCreatePacket::write(DataStream& ds) const {
SystemObjectDestroyPacket::SystemObjectDestroyPacket() {}
-SystemObjectDestroyPacket::SystemObjectDestroyPacket(Uuid objectUuid) : objectUuid(move(objectUuid)) {}
+SystemObjectDestroyPacket::SystemObjectDestroyPacket(Uuid objectUuid) : objectUuid(std::move(objectUuid)) {}
void SystemObjectDestroyPacket::read(DataStream& ds) {
ds.read(objectUuid);
@@ -1165,7 +1165,7 @@ void SystemObjectDestroyPacket::write(DataStream& ds) const {
SystemShipCreatePacket::SystemShipCreatePacket() {}
-SystemShipCreatePacket::SystemShipCreatePacket(ByteArray shipStore) : shipStore(move(shipStore)) {}
+SystemShipCreatePacket::SystemShipCreatePacket(ByteArray shipStore) : shipStore(std::move(shipStore)) {}
void SystemShipCreatePacket::read(DataStream& ds) {
ds.read(shipStore);
@@ -1177,7 +1177,7 @@ void SystemShipCreatePacket::write(DataStream& ds) const {
SystemShipDestroyPacket::SystemShipDestroyPacket() {}
-SystemShipDestroyPacket::SystemShipDestroyPacket(Uuid shipUuid) : shipUuid(move(shipUuid)) {}
+SystemShipDestroyPacket::SystemShipDestroyPacket(Uuid shipUuid) : shipUuid(std::move(shipUuid)) {}
void SystemShipDestroyPacket::read(DataStream& ds) {
ds.read(shipUuid);
@@ -1190,7 +1190,7 @@ void SystemShipDestroyPacket::write(DataStream& ds) const {
SystemObjectSpawnPacket::SystemObjectSpawnPacket() {}
SystemObjectSpawnPacket::SystemObjectSpawnPacket(String typeName, Uuid uuid, Maybe<Vec2F> position, JsonObject parameters)
- : typeName(move(typeName)), uuid(move(uuid)), position(move(position)), parameters(move(parameters)) {}
+ : typeName(std::move(typeName)), uuid(std::move(uuid)), position(std::move(position)), parameters(std::move(parameters)) {}
void SystemObjectSpawnPacket::read(DataStream& ds) {
ds.read(typeName);
diff --git a/source/game/StarNetworkedAnimator.cpp b/source/game/StarNetworkedAnimator.cpp
index 6f74f02..f64d293 100644
--- a/source/game/StarNetworkedAnimator.cpp
+++ b/source/game/StarNetworkedAnimator.cpp
@@ -108,7 +108,7 @@ NetworkedAnimator::NetworkedAnimator(Json config, String relativePath) : Network
for (auto const& pair : config.get("rotationGroups", JsonObject()).iterateObject()) {
String rotationGroupName = pair.first;
Json rotationGroupConfig = pair.second;
- RotationGroup& rotationGroup = m_rotationGroups[move(rotationGroupName)];
+ RotationGroup& rotationGroup = m_rotationGroups[std::move(rotationGroupName)];
rotationGroup.angularVelocity = rotationGroupConfig.getFloat("angularVelocity", 0.0f);
rotationGroup.rotationCenter = jsonToVec2F(rotationGroupConfig.get("rotationCenter", JsonArray{0, 0}));
}
@@ -117,7 +117,7 @@ NetworkedAnimator::NetworkedAnimator(Json config, String relativePath) : Network
String particleEmitterName = pair.first;
Json particleEmitterConfig = pair.second;
- ParticleEmitter& emitter = m_particleEmitters[move(particleEmitterName)];
+ ParticleEmitter& emitter = m_particleEmitters[std::move(particleEmitterName)];
emitter.emissionRate.set(particleEmitterConfig.getFloat("emissionRate", 1.0f));
emitter.emissionRateVariance = particleEmitterConfig.getFloat("emissionRateVariance", 0.0f);
emitter.offsetRegion.set(particleEmitterConfig.opt("offsetRegion").apply(jsonToRectF).value(RectF::null()));
@@ -147,7 +147,7 @@ NetworkedAnimator::NetworkedAnimator(Json config, String relativePath) : Network
String lightName = pair.first;
Json lightConfig = pair.second;
- Light& light = m_lights[move(lightName)];
+ Light& light = m_lights[std::move(lightName)];
light.active.set(lightConfig.getBool("active", true));
auto lightPosition = lightConfig.opt("position").apply(jsonToVec2F).value();
light.xPosition.set(lightPosition[0]);
@@ -177,7 +177,7 @@ NetworkedAnimator::NetworkedAnimator(Json config, String relativePath) : Network
for (auto const& pair : config.get("sounds", JsonObject()).iterateObject()) {
String soundName = pair.first;
Json soundConfig = pair.second;
- Sound& sound = m_sounds[move(soundName)];
+ Sound& sound = m_sounds[std::move(soundName)];
if (soundConfig.isType(Json::Type::Array)) {
sound.rangeMultiplier = 1.0f;
sound.soundPool.set(jsonToStringList(soundConfig).transformed(bind(&AssetPath::relativeTo, m_relativePath, _1)));
@@ -231,7 +231,7 @@ NetworkedAnimator::NetworkedAnimator(Json config, String relativePath) : Network
}
NetworkedAnimator::NetworkedAnimator(NetworkedAnimator&& animator) {
- operator=(move(animator));
+ operator=(std::move(animator));
}
NetworkedAnimator::NetworkedAnimator(NetworkedAnimator const& animator) {
@@ -239,23 +239,23 @@ NetworkedAnimator::NetworkedAnimator(NetworkedAnimator const& animator) {
}
NetworkedAnimator& NetworkedAnimator::operator=(NetworkedAnimator&& animator) {
- m_relativePath = move(animator.m_relativePath);
- m_animatedParts = move(animator.m_animatedParts);
- m_stateInfo = move(animator.m_stateInfo);
- m_transformationGroups = move(animator.m_transformationGroups);
- m_rotationGroups = move(animator.m_rotationGroups);
- m_particleEmitters = move(animator.m_particleEmitters);
- m_lights = move(animator.m_lights);
- m_sounds = move(animator.m_sounds);
- m_effects = move(animator.m_effects);
- m_processingDirectives = move(animator.m_processingDirectives);
- m_zoom = move(animator.m_zoom);
- m_flipped = move(animator.m_flipped);
- m_flippedRelativeCenterLine = move(animator.m_flippedRelativeCenterLine);
- m_animationRate = move(animator.m_animationRate);
- m_globalTags = move(animator.m_globalTags);
- m_partTags = move(animator.m_partTags);
- m_cachedPartDrawables = move(animator.m_cachedPartDrawables);
+ m_relativePath = std::move(animator.m_relativePath);
+ m_animatedParts = std::move(animator.m_animatedParts);
+ m_stateInfo = std::move(animator.m_stateInfo);
+ m_transformationGroups = std::move(animator.m_transformationGroups);
+ m_rotationGroups = std::move(animator.m_rotationGroups);
+ m_particleEmitters = std::move(animator.m_particleEmitters);
+ m_lights = std::move(animator.m_lights);
+ m_sounds = std::move(animator.m_sounds);
+ m_effects = std::move(animator.m_effects);
+ m_processingDirectives = std::move(animator.m_processingDirectives);
+ m_zoom = std::move(animator.m_zoom);
+ m_flipped = std::move(animator.m_flipped);
+ m_flippedRelativeCenterLine = std::move(animator.m_flippedRelativeCenterLine);
+ m_animationRate = std::move(animator.m_animationRate);
+ m_globalTags = std::move(animator.m_globalTags);
+ m_partTags = std::move(animator.m_partTags);
+ m_cachedPartDrawables = std::move(animator.m_cachedPartDrawables);
setupNetStates();
@@ -380,7 +380,7 @@ Maybe<PolyF> NetworkedAnimator::partPoly(String const& partName, String const& p
}
void NetworkedAnimator::setGlobalTag(String tagName, String tagValue) {
- m_globalTags.set(move(tagName), move(tagValue));
+ m_globalTags.set(std::move(tagName), std::move(tagValue));
}
void NetworkedAnimator::removeGlobalTag(String const& tagName) {
@@ -393,7 +393,7 @@ String const* NetworkedAnimator::globalTagPtr(String const& tagName) const {
void NetworkedAnimator::setPartTag(String const& partType, String tagName, String tagValue) {
- m_partTags[partType].set(move(tagName), move(tagValue));
+ m_partTags[partType].set(std::move(tagName), std::move(tagValue));
}
void NetworkedAnimator::setProcessingDirectives(Directives const& directives) {
@@ -528,7 +528,7 @@ bool NetworkedAnimator::hasSound(String const& soundName) const {
}
void NetworkedAnimator::setSoundPool(String const& soundName, StringList soundPool) {
- m_sounds.get(soundName).soundPool.set(move(soundPool));
+ m_sounds.get(soundName).soundPool.set(std::move(soundPool));
}
void NetworkedAnimator::setSoundPosition(String const& soundName, Vec2F const& position) {
@@ -568,7 +568,7 @@ void NetworkedAnimator::setEffectEnabled(String const& effect, bool enabled) {
List<Drawable> NetworkedAnimator::drawables(Vec2F const& position) const {
List<Drawable> drawables;
for (auto& p : drawablesWithZLevel(position))
- drawables.append(move(p.first));
+ drawables.append(std::move(p.first));
return drawables;
}
@@ -655,10 +655,10 @@ List<pair<Drawable, float>> NetworkedAnimator::drawablesWithZLevel(Vec2F const&
Drawable drawable = Drawable::makeImage(!relativeImage.empty() ? relativeImage : usedImage, 1.0f / TilePixels, centered, Vec2F());
if (find == m_cachedPartDrawables.end())
- find = m_cachedPartDrawables.emplace(partName, std::pair{ hash, move(drawable) }).first;
+ find = m_cachedPartDrawables.emplace(partName, std::pair{ hash, std::move(drawable) }).first;
else {
find->second.first = hash;
- find->second.second = move(drawable);
+ find->second.second = std::move(drawable);
}
}
@@ -671,7 +671,7 @@ List<pair<Drawable, float>> NetworkedAnimator::drawablesWithZLevel(Vec2F const&
drawable.fullbright = fullbright;
drawable.translate(position);
- drawables.append({move(drawable), zLevel});
+ drawables.append({std::move(drawable), zLevel});
}
baseProcessingDirectives.resize(originalDirectivesSize);
@@ -750,7 +750,7 @@ void NetworkedAnimator::update(float dt, DynamicTarget* dynamicTarget) {
bool changedPersistentSound = persistentSound != activePersistentSound.sound;
if (changedPersistentSound || !activePersistentSound.audio) {
- activePersistentSound.sound = move(persistentSound);
+ activePersistentSound.sound = std::move(persistentSound);
if (activePersistentSound.audio)
activePersistentSound.audio->stop(activePersistentSound.stopRampTime);
@@ -781,7 +781,7 @@ void NetworkedAnimator::update(float dt, DynamicTarget* dynamicTarget) {
bool changedImmediateSound = immediateSound != activeImmediateSound.sound;
if (changedImmediateSound) {
- activeImmediateSound.sound = move(immediateSound);
+ activeImmediateSound.sound = std::move(immediateSound);
if (!immediateSoundFile.empty()) {
activeImmediateSound.audio = make_shared<AudioInstance>(*Root::singleton().assets()->audio(immediateSoundFile));
activeImmediateSound.audio->setRangeMultiplier(activeState.properties.value("immediateSoundRangeMultiplier", 1.0f).toFloat());
@@ -843,7 +843,7 @@ void NetworkedAnimator::update(float dt, DynamicTarget* dynamicTarget) {
particle.rotation += Constants::pi;
}
- dynamicTarget->pendingParticles.append(move(particle));
+ dynamicTarget->pendingParticles.append(std::move(particle));
}
};
@@ -916,7 +916,7 @@ void NetworkedAnimator::update(float dt, DynamicTarget* dynamicTarget) {
sound->setVolume(soundEntry.volumeTarget.get(), soundEntry.volumeRampTime.get());
sound->setPitchMultiplier(soundEntry.pitchMultiplierTarget.get(), soundEntry.pitchMultiplierRampTime.get());
dynamicTarget->independentSounds[soundName].append(sound);
- dynamicTarget->pendingAudios.append(move(sound));
+ dynamicTarget->pendingAudios.append(std::move(sound));
}
}
}
diff --git a/source/game/StarNpc.cpp b/source/game/StarNpc.cpp
index af0bedb..3f15217 100644
--- a/source/game/StarNpc.cpp
+++ b/source/game/StarNpc.cpp
@@ -271,7 +271,7 @@ pair<ByteArray, uint64_t> Npc::writeNetState(uint64_t fromVersion) {
}
void Npc::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
String Npc::description() const {
@@ -479,7 +479,7 @@ void Npc::render(RenderCallback* renderCallback) {
drawable.translate(position());
if (drawable.isImage())
drawable.imagePart().addDirectivesGroup(m_statusController->parentDirectives(), true);
- renderCallback->addDrawable(move(drawable), renderLayer);
+ renderCallback->addDrawable(std::move(drawable), renderLayer);
}
renderCallback->addDrawables(m_statusController->drawables(), renderLayer);
diff --git a/source/game/StarNpcDatabase.cpp b/source/game/StarNpcDatabase.cpp
index f7b14de..343702e 100644
--- a/source/game/StarNpcDatabase.cpp
+++ b/source/game/StarNpcDatabase.cpp
@@ -134,7 +134,7 @@ NpcVariant NpcDatabase::generateNpcVariant(
}
}
- variant.items[itemSlotConfig.first] = move(item);
+ variant.items[itemSlotConfig.first] = std::move(item);
}
}
}
diff --git a/source/game/StarObject.cpp b/source/game/StarObject.cpp
index 7457b5d..c56229e 100644
--- a/source/game/StarObject.cpp
+++ b/source/game/StarObject.cpp
@@ -155,8 +155,8 @@ void Object::init(World* world, EntityId entityId, EntityMode mode) {
else
colorDirectives = colorName.substr(colorEnd, suffixBegin - colorEnd);
- m_colorSuffix = move(colorSuffix);
- m_colorDirectives = move(colorDirectives);
+ m_colorSuffix = std::move(colorSuffix);
+ m_colorDirectives = std::move(colorDirectives);
}
else
m_colorDirectives = m_colorSuffix = "";
@@ -293,7 +293,7 @@ pair<ByteArray, uint64_t> Object::writeNetState(uint64_t fromVersion) {
}
void Object::readNetState(ByteArray delta, float interpolationTime) {
- m_netGroup.readNetState(move(delta), interpolationTime);
+ m_netGroup.readNetState(std::move(delta), interpolationTime);
}
Vec2I Object::tilePosition() const {
@@ -501,7 +501,7 @@ void Object::destroy(RenderCallback* renderCallback) {
if (renderCallback && doSmash && !m_config->smashSoundOptions.empty()) {
auto audio = make_shared<AudioInstance>(*Root::singleton().assets()->audio(Random::randFrom(m_config->smashSoundOptions)));
- renderCallback->addAudios({move(audio)}, position());
+ renderCallback->addAudios({std::move(audio)}, position());
}
if (renderCallback && doSmash && !m_config->smashParticles.empty()) {
@@ -523,7 +523,7 @@ void Object::destroy(RenderCallback* renderCallback) {
particle.flip = !particle.flip;
}
particle.translate(position() + volume().center());
- particles.append(move(particle));
+ particles.append(std::move(particle));
}
}
renderCallback->addParticles(particles);
@@ -680,7 +680,7 @@ void Object::readStoredData(Json const& diskStore) {
List<WireConnection> connections;
for (auto const& conn : inputNodes[i].getArray("connections"))
connections.append(WireConnection{jsonToVec2I(conn.get(0)), (size_t)conn.get(1).toUInt()});
- in.connections.set(move(connections));
+ in.connections.set(std::move(connections));
in.state.set(inputNodes[i].getBool("state"));
}
}
@@ -692,7 +692,7 @@ void Object::readStoredData(Json const& diskStore) {
List<WireConnection> connections;
for (auto const& conn : outputNodes[i].getArray("connections"))
connections.append(WireConnection{jsonToVec2I(conn.get(0)), (size_t)conn.get(1).toUInt()});
- in.connections.set(move(connections));
+ in.connections.set(std::move(connections));
in.state.set(outputNodes[i].getBool("state"));
}
}
@@ -707,7 +707,7 @@ Json Object::writeStoredData() const {
connections.append(JsonArray{jsonFromVec2I(node.entityLocation), node.nodeIndex});
inputNodes.append(JsonObject{
- {"connections", move(connections)},
+ {"connections", std::move(connections)},
{"state", in.state.get()}
});
}
@@ -720,7 +720,7 @@ Json Object::writeStoredData() const {
connections.append(JsonArray{jsonFromVec2I(node.entityLocation), node.nodeIndex});
outputNodes.append(JsonObject{
- {"connections", move(connections)},
+ {"connections", std::move(connections)},
{"state", in.state.get()}
});
}
@@ -732,8 +732,8 @@ Json Object::writeStoredData() const {
{"direction", DirectionNames.getRight(m_direction.get())},
{"scriptStorage", m_scriptComponent.getScriptStorage()},
{"interactive", m_interactive.get()},
- {"inputWireNodes", move(inputNodes)},
- {"outputWireNodes", move(outputNodes)}
+ {"inputWireNodes", std::move(inputNodes)},
+ {"outputWireNodes", std::move(outputNodes)}
};
}
@@ -1028,11 +1028,11 @@ LuaCallbacks Object::makeObjectCallbacks() {
});
callbacks.registerCallback("setConfigParameter", [this](String key, Json value) {
- m_parameters.set(move(key), move(value));
+ m_parameters.set(std::move(key), std::move(value));
});
callbacks.registerCallback("setAnimationParameter", [this](String key, Json value) {
- m_scriptedAnimationParameters.set(move(key), move(value));
+ m_scriptedAnimationParameters.set(std::move(key), std::move(value));
});
callbacks.registerCallback("setMaterialSpaces", [this](Maybe<JsonArray> const& newSpaces) {
@@ -1241,7 +1241,7 @@ List<Drawable> Object::orientationDrawables(size_t orientationIndex) const {
String imagePath = AssetPath::join(imagePart.image);
if ((m_colorDirectives || !m_colorSuffix.empty()) && m_imageKeys.contains("color")) { // We had to leave color untouched despite separating its directives for server-side compatibility reasons, temporarily substr it in the image key
String& color = m_imageKeys.find("color")->second;
- String backup = move(color);
+ String backup = std::move(color);
color = backup.substr(0, backup.find('?'));
// backwards compatibility for this is really annoying, need to append text after the <color> tag to the last directive for a rare use-case
@@ -1252,7 +1252,7 @@ List<Drawable> Object::orientationDrawables(size_t orientationIndex) const {
else
imagePart.image = imagePath.replaceTags(m_imageKeys, true, "default");
- color = move(backup);
+ color = std::move(backup);
imagePart.image.directives = layer.imagePart().image.directives;
if (m_colorDirectives)
@@ -1270,7 +1270,7 @@ List<Drawable> Object::orientationDrawables(size_t orientationIndex) const {
if (orientation->flipImages)
drawable.scale(Vec2F(-1, 1), drawable.boundBox(false).center() - drawable.position);
- m_orientationDrawablesCache->second.append(move(drawable));
+ m_orientationDrawablesCache->second.append(std::move(drawable));
}
}
@@ -1311,7 +1311,7 @@ void Object::renderParticles(RenderCallback* renderCallback) {
if (particleEmitter.placeInSpaces)
particle.translate(Vec2F(Random::randFrom(orientation->spaces)) + Vec2F(0.5, 0.5));
particle.translate(position());
- renderCallback->addParticle(move(particle));
+ renderCallback->addParticle(std::move(particle));
timer = GameTimer(1.0f / (particleEmitter.particleEmissionRate + Random::randf(-particleEmitter.particleEmissionRateVariance, particleEmitter.particleEmissionRateVariance)));
}
}
diff --git a/source/game/StarObjectDatabase.cpp b/source/game/StarObjectDatabase.cpp
index d886be8..68ec6a9 100644
--- a/source/game/StarObjectDatabase.cpp
+++ b/source/game/StarObjectDatabase.cpp
@@ -300,7 +300,7 @@ List<ObjectOrientationPtr> ObjectDatabase::parseOrientations(String const& path,
orientation->touchDamageConfig = parseTouchDamage(path, orientationSettings);
- res.append(move(orientation));
+ res.append(std::move(orientation));
}
return res;
@@ -584,7 +584,7 @@ List<Drawable> ObjectDatabase::cursorHintDrawables(World const* world, String co
image = AssetPath::join(image).replaceTags(StringMap<String>(), true, "default");
if (orientation->flipImages)
drawable.scale(Vec2F(-1, 1), drawable.boundBox(false).center() - drawable.position);
- drawables.append(move(drawable));
+ drawables.append(std::move(drawable));
}
Drawable::translateAll(drawables, Vec2F(position) + orientation->imagePosition);
}
diff --git a/source/game/StarParallax.cpp b/source/game/StarParallax.cpp
index 8ebb391..2670699 100644
--- a/source/game/StarParallax.cpp
+++ b/source/game/StarParallax.cpp
@@ -69,7 +69,7 @@ void ParallaxLayer::addImageDirectives(Directives const& newDirectives) {
dirString += newString;
}
- directives = move(dirString);
+ directives = std::move(dirString);
}
else
directives = newDirectives;
diff --git a/source/game/StarParticleDatabase.cpp b/source/game/StarParticleDatabase.cpp
index bade6b5..04e0f46 100644
--- a/source/game/StarParticleDatabase.cpp
+++ b/source/game/StarParticleDatabase.cpp
@@ -47,7 +47,7 @@ ParticleVariantCreator ParticleDatabase::particleCreator(Json const& kindOrConfi
} else {
Particle particle(kindOrConfig.toObject(), relativePath);
Particle variance(kindOrConfig.getObject("variance", {}), relativePath);
- return makeParticleVariantCreator(move(particle), move(variance));
+ return makeParticleVariantCreator(std::move(particle), std::move(variance));
}
}
diff --git a/source/game/StarParticleManager.cpp b/source/game/StarParticleManager.cpp
index c19eab6..e4e028c 100644
--- a/source/game/StarParticleManager.cpp
+++ b/source/game/StarParticleManager.cpp
@@ -8,11 +8,11 @@ ParticleManager::ParticleManager(WorldGeometry const& worldGeometry, ClientTileS
: m_worldGeometry(worldGeometry), m_undergroundLevel(0.0f), m_tileSectorArray(tileSectorArray) {}
void ParticleManager::add(Particle particle) {
- m_particles.push_back(move(particle));
+ m_particles.push_back(std::move(particle));
}
void ParticleManager::addParticles(List<Particle> particles) {
- m_particles.appendAll(move(particles));
+ m_particles.appendAll(std::move(particles));
}
size_t ParticleManager::count() const {
@@ -88,11 +88,11 @@ void ParticleManager::update(float dt, RectF const& cullRegion, float wind) {
trail.trail = false;
trail.timeToLive = 0;
trail.velocity = {};
- m_nextParticles.append(move(trail));
+ m_nextParticles.append(std::move(trail));
}
if (!particle.dead())
- m_nextParticles.append(move(particle));
+ m_nextParticles.append(std::move(particle));
}
m_particles.clear();
diff --git a/source/game/StarPlant.cpp b/source/game/StarPlant.cpp
index f26c73a..6f1dece 100644
--- a/source/game/StarPlant.cpp
+++ b/source/game/StarPlant.cpp
@@ -591,7 +591,7 @@ pair<ByteArray, uint64_t> Plant::writeNetState(uint64_t fromVersion) {
}
void Plant::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void Plant::enableInterpolation(float extrapolationHint) {
@@ -758,7 +758,7 @@ void Plant::render(RenderCallback* renderCallback) {
drawable.rotate(branchRotation(m_tilePosition[0], plantPiece.rotationOffset * 1.4f), plantPiece.offset + Vec2F(size) / 2.0f);
}
drawable.translate(position());
- renderCallback->addDrawable(move(drawable), RenderLayerPlant);
+ renderCallback->addDrawable(std::move(drawable), RenderLayerPlant);
}
if (m_tileDamageEvent) {
@@ -780,7 +780,7 @@ void Plant::render(RenderCallback* renderCallback) {
}
particle.position = {m_tileDamageX + Random::randf(), m_tileDamageY + Random::randf()};
particle.translate(position());
- renderCallback->addParticle(move(particle));
+ renderCallback->addParticle(std::move(particle));
}
JsonArray damageTreeSoundOptions = m_stemDropConfig.get("sounds", JsonObject()).getArray("damageTree", JsonArray());
if (damageTreeSoundOptions.size()) {
@@ -790,7 +790,7 @@ void Plant::render(RenderCallback* renderCallback) {
auto audioInstance = make_shared<AudioInstance>(*assets->audio(sound.getString("file")));
audioInstance->setPosition(pos);
audioInstance->setVolume(sound.getFloat("volume", 1.0f));
- renderCallback->addAudio(move(audioInstance));
+ renderCallback->addAudio(std::move(audioInstance));
}
}
}
@@ -798,7 +798,7 @@ void Plant::render(RenderCallback* renderCallback) {
void Plant::readPieces(ByteArray pieces) {
if (!pieces.empty()) {
- DataStreamBuffer ds(move(pieces));
+ DataStreamBuffer ds(std::move(pieces));
ds.readContainer(m_pieces, [](DataStream& ds, PlantPiece& piece) {
ds.read(piece.image);
ds.read(piece.offset[0]);
diff --git a/source/game/StarPlantDrop.cpp b/source/game/StarPlantDrop.cpp
index 1c242b2..b739856 100644
--- a/source/game/StarPlantDrop.cpp
+++ b/source/game/StarPlantDrop.cpp
@@ -306,7 +306,7 @@ void PlantDrop::render(RenderCallback* renderCallback) {
auto audioInstance = make_shared<AudioInstance>(*assets->audio(sound.getString("file")));
audioInstance->setPosition(collisionRect().center() + position());
audioInstance->setVolume(sound.getFloat("volume", 1.0f));
- renderCallback->addAudio(move(audioInstance));
+ renderCallback->addAudio(std::move(audioInstance));
}
};
playBreakSound(m_stemConfig);
@@ -332,7 +332,7 @@ void PlantDrop::render(RenderCallback* renderCallback) {
auto audioInstance = make_shared<AudioInstance>(*assets->audio(sound.getString("file")));
audioInstance->setPosition(collisionRect().center() + position());
audioInstance->setVolume(sound.getFloat("volume", 1.0f));
- renderCallback->addAudio(move(audioInstance));
+ renderCallback->addAudio(std::move(audioInstance));
}
};
playHitSound(m_stemConfig);
@@ -353,7 +353,7 @@ void PlantDrop::render(RenderCallback* renderCallback) {
drawable.scale(Vec2F(-1, 1));
drawable.rotate(m_movementController.rotation());
drawable.translate(position());
- renderCallback->addDrawable(move(drawable), RenderLayerPlantDrop);
+ renderCallback->addDrawable(std::move(drawable), RenderLayerPlantDrop);
}
}
}
@@ -363,7 +363,7 @@ pair<ByteArray, uint64_t> PlantDrop::writeNetState(uint64_t fromVersion) {
}
void PlantDrop::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void PlantDrop::enableInterpolation(float extrapolationHint) {
diff --git a/source/game/StarPlatformerAStar.cpp b/source/game/StarPlatformerAStar.cpp
index c74802c..fbd873b 100644
--- a/source/game/StarPlatformerAStar.cpp
+++ b/source/game/StarPlatformerAStar.cpp
@@ -48,8 +48,8 @@ namespace PlatformerAStar {
: m_world(world),
m_searchFrom(searchFrom),
m_searchTo(searchTo),
- m_movementParams(move(movementParameters)),
- m_searchParams(move(searchParameters)) {
+ m_movementParams(std::move(movementParameters)),
+ m_searchParams(std::move(searchParameters)) {
initAStar();
}
diff --git a/source/game/StarPlayer.cpp b/source/game/StarPlayer.cpp
index 3969646..ebadf20 100644
--- a/source/game/StarPlayer.cpp
+++ b/source/game/StarPlayer.cpp
@@ -274,7 +274,7 @@ ClientContextPtr Player::clientContext() const {
}
void Player::setClientContext(ClientContextPtr clientContext) {
- m_clientContext = move(clientContext);
+ m_clientContext = std::move(clientContext);
if (m_clientContext)
m_universeMap->setServerUuid(m_clientContext->serverUuid());
}
@@ -380,7 +380,7 @@ List<Drawable> Player::drawables() const {
drawable.imagePart().addDirectives(*directives, true);
}
}
- drawables.append(move(drawable));
+ drawables.append(std::move(drawable));
}
}
drawables.appendAll(m_techController->frontDrawables());
@@ -1079,14 +1079,14 @@ void Player::render(RenderCallback* renderCallback) {
auto landingNoise = make_shared<AudioInstance>(*footstepAudio);
landingNoise->setPosition(position() + feetOffset());
landingNoise->setVolume(m_landingVolume);
- renderCallback->addAudio(move(landingNoise));
+ renderCallback->addAudio(std::move(landingNoise));
}
if (m_footstepPending) {
auto stepNoise = make_shared<AudioInstance>(*footstepAudio);
stepNoise->setPosition(position() + feetOffset());
stepNoise->setVolume(1 - Random::randf(0, m_footstepVolumeVariance));
- renderCallback->addAudio(move(stepNoise));
+ renderCallback->addAudio(std::move(stepNoise));
}
} else {
m_footstepTimer = m_config->footstepTiming;
@@ -1105,7 +1105,7 @@ void Player::render(RenderCallback* renderCallback) {
audio->setVolume(get<1>(p));
audio->setPitchMultiplier(get<2>(p));
audio->setPosition(position());
- renderCallback->addAudio(move(audio));
+ renderCallback->addAudio(std::move(audio));
}
auto loungeAnchor = as<LoungeAnchor>(m_movementController->entityAnchor());
@@ -1594,7 +1594,7 @@ pair<ByteArray, uint64_t> Player::writeNetState(uint64_t fromVersion) {
}
void Player::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void Player::enableInterpolation(float) {
@@ -2003,7 +2003,7 @@ ShipUpgrades Player::shipUpgrades() {
}
void Player::setShipUpgrades(ShipUpgrades shipUpgrades) {
- m_shipUpgrades = move(shipUpgrades);
+ m_shipUpgrades = std::move(shipUpgrades);
}
void Player::applyShipUpgrades(Json const& upgrades) {
@@ -2133,7 +2133,7 @@ HumanoidIdentity const& Player::identity() const {
}
void Player::setIdentity(HumanoidIdentity identity) {
- m_identity = move(identity);
+ m_identity = std::move(identity);
updateIdentity();
}
@@ -2258,7 +2258,7 @@ Json Player::diskStore() {
for (auto& p : m_genericScriptContexts) {
auto scriptStorage = p.second->getScriptStorage();
if (!scriptStorage.empty())
- genericScriptStorage[p.first] = move(scriptStorage);
+ genericScriptStorage[p.first] = std::move(scriptStorage);
}
return JsonObject{
@@ -2580,7 +2580,7 @@ Json Player::getSecretProperty(String const& name, Json defaultValue) const {
{ Logger::error("Exception reading secret player property '{}': {}", name, e.what()); }
}
- return move(defaultValue);
+ return defaultValue;
}
void Player::setSecretProperty(String const& name, Json const& value) {
diff --git a/source/game/StarPlayerInventory.cpp b/source/game/StarPlayerInventory.cpp
index 7c4ca3e..d7ba6a1 100644
--- a/source/game/StarPlayerInventory.cpp
+++ b/source/game/StarPlayerInventory.cpp
@@ -215,7 +215,7 @@ ItemPtr PlayerInventory::addItems(ItemPtr items) {
m_equipment[EquipmentSlot::Back] = items->take(1);
// Then, finally the bags
- return addToBags(move(items));
+ return addToBags(std::move(items));
}
ItemPtr PlayerInventory::addToBags(ItemPtr items) {
@@ -776,9 +776,9 @@ void PlayerInventory::load(Json const& store) {
auto newBag = ItemBag::loadStore(p.second);
auto& bagPtr = m_bags[bagType];
if (bagPtr)
- *bagPtr = move(newBag);
+ *bagPtr = std::move(newBag);
else
- bagPtr = make_shared<ItemBag>(move(newBag));
+ bagPtr = make_shared<ItemBag>(std::move(newBag));
}
m_swapSlot = itemDatabase->diskLoad(store.get("swapSlot"));
@@ -838,7 +838,7 @@ Json PlayerInventory::store() const {
{"trashSlot", itemDatabase->diskStore(m_trashSlot)},
{"currencies", jsonFromMap(m_currencies)},
{"customBarGroup", m_customBarGroup},
- {"customBar", move(customBar)},
+ {"customBar", std::move(customBar)},
{"selectedActionBar", jsonFromSelectedActionBarLocation(m_selectedActionBar)},
{"beamAxe", itemDatabase->diskStore(m_essential.value(EssentialItem::BeamAxe))},
{"wireTool", itemDatabase->diskStore(m_essential.value(EssentialItem::WireTool))},
@@ -848,7 +848,7 @@ Json PlayerInventory::store() const {
}
void PlayerInventory::forEveryItem(function<void(InventorySlot const&, ItemPtr&)> function) {
- auto checkedFunction = [function = move(function)](InventorySlot const& slot, ItemPtr& item) {
+ auto checkedFunction = [function = std::move(function)](InventorySlot const& slot, ItemPtr& item) {
if (item)
function(slot, item);
};
@@ -864,7 +864,7 @@ void PlayerInventory::forEveryItem(function<void(InventorySlot const&, ItemPtr&)
}
void PlayerInventory::forEveryItem(function<void(InventorySlot const&, ItemPtr const&)> function) const {
- return const_cast<PlayerInventory*>(this)->forEveryItem([function = move(function)](InventorySlot const& slot, ItemPtr& item) {
+ return const_cast<PlayerInventory*>(this)->forEveryItem([function = std::move(function)](InventorySlot const& slot, ItemPtr& item) {
function(slot, item);
});
}
diff --git a/source/game/StarPlayerStorage.cpp b/source/game/StarPlayerStorage.cpp
index 5bb3f4e..72932f1 100644
--- a/source/game/StarPlayerStorage.cpp
+++ b/source/game/StarPlayerStorage.cpp
@@ -269,9 +269,9 @@ void PlayerStorage::backupCycle(Uuid const& uuid) {
}
void PlayerStorage::setMetadata(String key, Json value) {
- auto& val = m_metadata[move(key)];
+ auto& val = m_metadata[std::move(key)];
if (val != value) {
- val = move(value);
+ val = std::move(value);
writeMetadata();
}
}
@@ -294,7 +294,7 @@ void PlayerStorage::writeMetadata() {
for (auto const& p : m_savedPlayersCache)
order.append(p.first.hex());
- m_metadata["order"] = move(order);
+ m_metadata["order"] = std::move(order);
String filename = File::relativeTo(m_storageDirectory, "metadata");
File::overwriteFileWithRename(Json(m_metadata).printJson(0), filename);
diff --git a/source/game/StarPlayerUniverseMap.cpp b/source/game/StarPlayerUniverseMap.cpp
index 42167db..f8576a2 100644
--- a/source/game/StarPlayerUniverseMap.cpp
+++ b/source/game/StarPlayerUniverseMap.cpp
@@ -75,7 +75,7 @@ void PlayerUniverseMap::addOrbitBookmark(CelestialCoordinate const& system, Orbi
if (system.isNull())
throw StarException("Cannot add orbit bookmark to null system");
- m_universeMaps[*m_serverUuid].systems[system.location()].bookmarks.add(move(bookmark));
+ m_universeMaps[*m_serverUuid].systems[system.location()].bookmarks.add(std::move(bookmark));
}
void PlayerUniverseMap::removeOrbitBookmark(CelestialCoordinate const& system, OrbitBookmark const& bookmark) {
@@ -90,7 +90,7 @@ List<TeleportBookmark> PlayerUniverseMap::teleportBookmarks() const {
}
void PlayerUniverseMap::addTeleportBookmark(TeleportBookmark bookmark) {
- m_universeMaps[*m_serverUuid].teleportBookmarks.add(move(bookmark));
+ m_universeMaps[*m_serverUuid].teleportBookmarks.add(std::move(bookmark));
}
void PlayerUniverseMap::removeTeleportBookmark(TeleportBookmark const& bookmark) {
@@ -192,7 +192,7 @@ void PlayerUniverseMap::filterMappedObjects(CelestialCoordinate const& system, L
}
void PlayerUniverseMap::setServerUuid(Maybe<Uuid> serverUuid) {
- m_serverUuid = move(serverUuid);
+ m_serverUuid = std::move(serverUuid);
if (m_serverUuid && !m_universeMaps.contains(*m_serverUuid))
m_universeMaps.set(*m_serverUuid, UniverseMap());
}
diff --git a/source/game/StarProjectile.cpp b/source/game/StarProjectile.cpp
index 7355135..57d8ca8 100644
--- a/source/game/StarProjectile.cpp
+++ b/source/game/StarProjectile.cpp
@@ -142,7 +142,7 @@ pair<ByteArray, uint64_t> Projectile::writeNetState(uint64_t fromVersion) {
}
void Projectile::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void Projectile::enableInterpolation(float extrapolationHint) {
@@ -371,7 +371,7 @@ void Projectile::render(RenderCallback* renderCallback) {
}
drawable.fullbright = m_config->fullbright;
drawable.translate(position());
- renderCallback->addDrawable(move(drawable), m_config->renderLayer);
+ renderCallback->addDrawable(std::move(drawable), m_config->renderLayer);
}
void Projectile::renderLightSources(RenderCallback* renderCallback) {
@@ -468,7 +468,7 @@ List<PhysicsForceRegion> Projectile::forceRegions() const {
if (p.second.enabled.get()) {
PhysicsForceRegion forceRegion = p.second.forceRegion;
forceRegion.call([pos = position()](auto& fr) { fr.translate(pos); });
- forces.append(move(forceRegion));
+ forces.append(std::move(forceRegion));
}
}
return forces;
@@ -512,7 +512,7 @@ List<Particle> Projectile::sparkBlock(World* world, Vec2I const& position, Vec2F
particle.finalVelocity = 0.5f * (particle.finalVelocity + Vec2F(Random::randf() - 0.5f, -20.0f + Random::randf()));
particle.trail = true;
- result.append(move(particle));
+ result.append(std::move(particle));
}
}
return result;
@@ -733,7 +733,7 @@ void Projectile::processAction(Json const& action) {
particle.finalVelocity = 0.5f * (particle.finalVelocity + Vec2F(Random::randf() - 0.5f, -20.0f + Random::randf()));
particle.trail = true;
- m_pendingRenderables.append(move(particle));
+ m_pendingRenderables.append(std::move(particle));
}
} else if (command == "particle") {
@@ -748,7 +748,7 @@ void Projectile::processAction(Json const& action) {
}
particle.translate(position());
particle.velocity += m_referenceVelocity.value();
- m_pendingRenderables.append(move(particle));
+ m_pendingRenderables.append(std::move(particle));
} else if (command == "explosion") {
if (isSlave())
@@ -796,7 +796,7 @@ void Projectile::processAction(Json const& action) {
Particle particle(parameters.getObject("particle"));
particle.translate(position());
particle.velocity += m_referenceVelocity.value();
- m_pendingRenderables.append(move(particle));
+ m_pendingRenderables.append(std::move(particle));
}
} else if (command == "item") {
@@ -816,7 +816,7 @@ void Projectile::processAction(Json const& action) {
AudioInstancePtr sound = make_shared<AudioInstance>(*Root::singleton().assets()->audio(Random::randValueFrom(parameters.getArray("options")).toString()));
sound->setPosition(position());
- m_pendingRenderables.append(move(sound));
+ m_pendingRenderables.append(std::move(sound));
} else if (command == "light") {
if (!world()->isClient())
@@ -904,10 +904,10 @@ void Projectile::setup() {
auto begin = processing.utf8().find_first_of('?');
if (begin == NPos) {
m_imageDirectives = "";
- m_imageSuffix = move(processing);
+ m_imageSuffix = std::move(processing);
}
else if (begin == 0) {
- m_imageDirectives = move(processing);
+ m_imageDirectives = std::move(processing);
m_imageSuffix = "";
}
else {
diff --git a/source/game/StarQuests.cpp b/source/game/StarQuests.cpp
index d3c07c5..6643362 100644
--- a/source/game/StarQuests.cpp
+++ b/source/game/StarQuests.cpp
@@ -370,7 +370,7 @@ void Quest::setWorldId(Maybe<WorldId> worldId) {
}
void Quest::setLocation(Maybe<pair<Vec3I, SystemLocation>> location) {
- m_location = move(location);
+ m_location = std::move(location);
}
void Quest::setServerUuid(Maybe<Uuid> serverUuid) {
diff --git a/source/game/StarRoot.cpp b/source/game/StarRoot.cpp
index 23abfd9..efb5e27 100644
--- a/source/game/StarRoot.cpp
+++ b/source/game/StarRoot.cpp
@@ -79,7 +79,7 @@ Root::Root(Settings settings) {
if (!s_singleton.compare_exchange_strong(oldRoot, this))
throw RootException("Singleton Root has been constructed twice");
- m_settings = move(settings);
+ m_settings = std::move(settings);
if (m_settings.runtimeConfigFile)
m_runtimeConfigFile = toStoragePath(*m_settings.runtimeConfigFile);
@@ -299,7 +299,7 @@ void Root::reload() {
void Root::reloadWithMods(StringList modDirectories) {
MutexLocker locker(m_modsMutex);
- m_modDirectories = move(modDirectories);
+ m_modDirectories = std::move(modDirectories);
reload();
}
@@ -363,7 +363,7 @@ void Root::fullyLoad() {
}
void Root::registerReloadListener(ListenerWeakPtr reloadListener) {
- m_reloadListeners.addListener(move(reloadListener));
+ m_reloadListeners.addListener(std::move(reloadListener));
}
String Root::toStoragePath(String const& path) const {
@@ -630,10 +630,10 @@ StringList Root::scanForAssetSources(StringList const& directories) {
}
} else {
namedSources[*assetSource->name] = assetSource;
- assetSources.append(move(assetSource));
+ assetSources.append(std::move(assetSource));
}
} else {
- assetSources.append(move(assetSource));
+ assetSources.append(std::move(assetSource));
}
}
}
@@ -675,11 +675,11 @@ StringList Root::scanForAssetSources(StringList const& directories) {
workingSet.remove(source);
- dependencySortedSources.add(move(source));
+ dependencySortedSources.add(std::move(source));
};
for (auto source : assetSources)
- dependencySortVisit(move(source));
+ dependencySortVisit(std::move(source));
StringList sourcePaths;
for (auto const& source : dependencySortedSources) {
diff --git a/source/game/StarRootLoader.cpp b/source/game/StarRootLoader.cpp
index 9ede365..f6843f3 100644
--- a/source/game/StarRootLoader.cpp
+++ b/source/game/StarRootLoader.cpp
@@ -106,7 +106,7 @@ RootLoader::RootLoader(Defaults defaults) {
addSwitch("runtimeconfig",
strf("Sets the path to the runtime configuration storage file relative to root directory, defauts to {}",
defaults.runtimeConfigFile ? *defaults.runtimeConfigFile : "no storage file"));
- m_defaults = move(defaults);
+ m_defaults = std::move(defaults);
}
pair<Root::Settings, RootLoader::Options> RootLoader::parseOrDie(
@@ -118,7 +118,7 @@ pair<Root::Settings, RootLoader::Options> RootLoader::parseOrDie(
pair<RootUPtr, RootLoader::Options> RootLoader::initOrDie(StringList const& cmdLineArguments) const {
auto p = parseOrDie(cmdLineArguments);
auto root = make_unique<Root>(p.first);
- return {move(root), p.second};
+ return {std::move(root), p.second};
}
pair<Root::Settings, RootLoader::Options> RootLoader::commandParseOrDie(int argc, char** argv) {
@@ -129,7 +129,7 @@ pair<Root::Settings, RootLoader::Options> RootLoader::commandParseOrDie(int argc
pair<RootUPtr, RootLoader::Options> RootLoader::commandInitOrDie(int argc, char** argv) {
auto p = commandParseOrDie(argc, argv);
auto root = make_unique<Root>(p.first);
- return {move(root), p.second};
+ return {std::move(root), p.second};
}
Root::Settings RootLoader::rootSettingsForOptions(Options const& options) const {
diff --git a/source/game/StarServerClientContext.cpp b/source/game/StarServerClientContext.cpp
index ff5b57a..838dae0 100644
--- a/source/game/StarServerClientContext.cpp
+++ b/source/game/StarServerClientContext.cpp
@@ -18,7 +18,7 @@ ServerClientContext::ServerClientContext(ConnectionId clientId, Maybe<HostAddres
m_playerName(playerName),
m_playerSpecies(playerSpecies),
m_canBecomeAdmin(canBecomeAdmin),
- m_shipChunks(move(initialShipChunks)) {
+ m_shipChunks(std::move(initialShipChunks)) {
m_rpc.registerHandler("ship.applyShipUpgrades", [this](Json const& args) -> Json {
RecursiveMutexLocker locker(m_mutex);
setShipUpgrades(shipUpgrades().apply(args));
@@ -166,7 +166,7 @@ WorldChunks ServerClientContext::shipChunks() const {
void ServerClientContext::updateShipChunks(WorldChunks newShipChunks) {
RecursiveMutexLocker locker(m_mutex);
m_shipChunksUpdate.merge(WorldStorage::getWorldChunksUpdate(m_shipChunks, newShipChunks), true);
- m_shipChunks = move(newShipChunks);
+ m_shipChunks = std::move(newShipChunks);
}
void ServerClientContext::readUpdate(ByteArray data) {
@@ -202,7 +202,7 @@ void ServerClientContext::setSystemWorld(SystemWorldServerThreadPtr systemWorldT
if (m_systemWorldThread == systemWorldThread)
return;
- m_systemWorldThread = move(systemWorldThread);
+ m_systemWorldThread = std::move(systemWorldThread);
}
SystemWorldServerThreadPtr ServerClientContext::systemWorld() const {
@@ -220,7 +220,7 @@ void ServerClientContext::setPlayerWorld(WorldServerThreadPtr worldThread) {
if (m_worldThread == worldThread)
return;
- m_worldThread = move(worldThread);
+ m_worldThread = std::move(worldThread);
if (m_worldThread)
m_playerWorldIdNetState.set(m_worldThread->worldId());
else
@@ -248,7 +248,7 @@ WarpToWorld ServerClientContext::playerReturnWarp() const {
void ServerClientContext::setPlayerReturnWarp(WarpToWorld warp) {
RecursiveMutexLocker locker(m_mutex);
- m_returnWarp = move(warp);
+ m_returnWarp = std::move(warp);
}
WarpToWorld ServerClientContext::playerReviveWarp() const {
@@ -258,7 +258,7 @@ WarpToWorld ServerClientContext::playerReviveWarp() const {
void ServerClientContext::setPlayerReviveWarp(WarpToWorld warp) {
RecursiveMutexLocker locker(m_mutex);
- m_reviveWarp = move(warp);
+ m_reviveWarp = std::move(warp);
}
void ServerClientContext::loadServerData(Json const& store) {
diff --git a/source/game/StarSky.cpp b/source/game/StarSky.cpp
index 05e6207..d9ac03a 100644
--- a/source/game/StarSky.cpp
+++ b/source/game/StarSky.cpp
@@ -71,7 +71,7 @@ pair<ByteArray, uint64_t> Sky::writeUpdate(uint64_t fromVersion) {
}
void Sky::readUpdate(ByteArray data) {
- m_netGroup.readNetState(move(data));
+ m_netGroup.readNetState(std::move(data));
}
void Sky::stateUpdate() {
diff --git a/source/game/StarSpawnTypeDatabase.cpp b/source/game/StarSpawnTypeDatabase.cpp
index 2affb5a..7ae3281 100644
--- a/source/game/StarSpawnTypeDatabase.cpp
+++ b/source/game/StarSpawnTypeDatabase.cpp
@@ -83,7 +83,7 @@ SpawnProfile::SpawnProfile(Json const& config) {
}
SpawnProfile::SpawnProfile(StringSet spawnTypes, Json monsterParameters)
- : spawnTypes(move(spawnTypes)), monsterParameters(move(monsterParameters)) {}
+ : spawnTypes(std::move(spawnTypes)), monsterParameters(std::move(monsterParameters)) {}
Json SpawnProfile::toJson() const {
return JsonObject{
diff --git a/source/game/StarSpawner.cpp b/source/game/StarSpawner.cpp
index f64ccfe..b313ba8 100644
--- a/source/game/StarSpawner.cpp
+++ b/source/game/StarSpawner.cpp
@@ -41,7 +41,7 @@ Spawner::Spawner() {
}
void Spawner::init(SpawnerFacadePtr facade) {
- m_facade = move(facade);
+ m_facade = std::move(facade);
}
void Spawner::uninit() {
diff --git a/source/game/StarStagehand.cpp b/source/game/StarStagehand.cpp
index 06fa9ae..83b7673 100644
--- a/source/game/StarStagehand.cpp
+++ b/source/game/StarStagehand.cpp
@@ -82,7 +82,7 @@ pair<ByteArray, uint64_t> Stagehand::writeNetState(uint64_t fromVersion) {
}
void Stagehand::readNetState(ByteArray data, float) {
- m_netGroup.readNetState(move(data));
+ m_netGroup.readNetState(std::move(data));
}
void Stagehand::update(float dt, uint64_t) {
diff --git a/source/game/StarStatCollection.cpp b/source/game/StarStatCollection.cpp
index 9f5e1f3..6ded538 100644
--- a/source/game/StarStatCollection.cpp
+++ b/source/game/StarStatCollection.cpp
@@ -166,7 +166,7 @@ void StatCollection::netElementsNeedLoad(bool) {
StatModifierGroupMap allModifiers;
for (auto const& p : m_statModifiersNetState)
allModifiers.add(p.first, p.second);
- m_stats.setAllStatModifierGroups(move(allModifiers));
+ m_stats.setAllStatModifierGroups(std::move(allModifiers));
}
for (auto const& pair : m_resourceValuesNetStates)
diff --git a/source/game/StarStatSet.cpp b/source/game/StarStatSet.cpp
index aa6513e..82258f8 100644
--- a/source/game/StarStatSet.cpp
+++ b/source/game/StarStatSet.cpp
@@ -4,7 +4,7 @@
namespace Star {
void StatSet::addStat(String statName, float baseValue) {
- if (!m_baseStats.insert(move(statName), baseValue).second)
+ if (!m_baseStats.insert(std::move(statName), baseValue).second)
throw StatusException::format("Added duplicate stat named '{}' in StatSet", statName);
update(0.0f);
}
@@ -42,7 +42,7 @@ void StatSet::setStatBaseValue(String const& statName, float value) {
StatModifierGroupId StatSet::addStatModifierGroup(List<StatModifier> modifiers) {
bool empty = modifiers.empty();
- auto id = m_statModifierGroups.add(move(modifiers));
+ auto id = m_statModifierGroups.add(std::move(modifiers));
if (!empty)
update(0.0f);
return id;
@@ -58,7 +58,7 @@ List<StatModifier> StatSet::statModifierGroup(StatModifierGroupId modifierGroupI
void StatSet::addStatModifierGroup(StatModifierGroupId groupId, List<StatModifier> modifiers) {
bool empty = modifiers.empty();
- m_statModifierGroups.add(groupId, move(modifiers));
+ m_statModifierGroups.add(groupId, std::move(modifiers));
if (!empty)
update(0.0f);
}
@@ -66,7 +66,7 @@ void StatSet::addStatModifierGroup(StatModifierGroupId groupId, List<StatModifie
bool StatSet::setStatModifierGroup(StatModifierGroupId groupId, List<StatModifier> modifiers) {
auto& list = m_statModifierGroups.get(groupId);
if (list != modifiers) {
- list = move(modifiers);
+ list = std::move(modifiers);
update(0.0f);
return true;
}
@@ -95,7 +95,7 @@ StatModifierGroupMap const& StatSet::allStatModifierGroups() const {
void StatSet::setAllStatModifierGroups(StatModifierGroupMap map) {
if (m_statModifierGroups != map) {
- m_statModifierGroups = move(map);
+ m_statModifierGroups = std::move(map);
update(0.0f);
}
}
@@ -118,7 +118,7 @@ float StatSet::statEffectiveValue(String const& statName) const {
}
void StatSet::addResource(String resourceName, MVariant<String, float> max, MVariant<String, float> delta) {
- auto pair = m_resources.insert({move(resourceName), Resource{move(max), move(delta), false, 0.0f, {}}});
+ auto pair = m_resources.insert({std::move(resourceName), Resource{std::move(max), std::move(delta), false, 0.0f, {}}});
if (!pair.second)
throw StatusException::format("Added duplicate resource named '{}' in StatSet", resourceName);
update(0.0f);
diff --git a/source/game/StarStatistics.cpp b/source/game/StarStatistics.cpp
index 6582663..0c24619 100644
--- a/source/game/StarStatistics.cpp
+++ b/source/game/StarStatistics.cpp
@@ -8,7 +8,7 @@
namespace Star {
Statistics::Statistics(String const& storageDirectory, StatisticsServicePtr service) {
- m_service = move(service);
+ m_service = std::move(service);
m_initialized = !m_service;
m_storageDirectory = storageDirectory;
readStatistics();
diff --git a/source/game/StarStatusController.cpp b/source/game/StarStatusController.cpp
index ba0930c..fcf9924 100644
--- a/source/game/StarStatusController.cpp
+++ b/source/game/StarStatusController.cpp
@@ -75,10 +75,10 @@ Json StatusController::diskStore() const {
return JsonObject{
{"statusProperties", m_statusProperties.get()},
- {"persistentEffectCategories", move(persistentEffectCategories)},
- {"ephemeralEffects", move(ephemeralEffects)},
- {"resourceValues", move(resourceValues)},
- {"resourcesLocked", move(resourcesLocked)},
+ {"persistentEffectCategories", std::move(persistentEffectCategories)},
+ {"ephemeralEffects", std::move(ephemeralEffects)},
+ {"resourceValues", std::move(resourceValues)},
+ {"resourcesLocked", std::move(resourcesLocked)},
};
}
@@ -111,7 +111,7 @@ Json StatusController::statusProperty(String const& name, Json const& def) const
void StatusController::setStatusProperty(String const& name, Json value) {
m_statusProperties.update([&](JsonObject& statusProperties) {
if (statusProperties[name] != value) {
- statusProperties[name] = move(value);
+ statusProperties[name] = std::move(value);
return true;
}
return false;
@@ -355,11 +355,11 @@ List<DamageNotification> StatusController::applyDamageRequest(DamageRequest cons
}
void StatusController::hitOther(EntityId targetEntityId, DamageRequest damageRequest) {
- m_recentHitsGiven.add({targetEntityId, move(damageRequest)});
+ m_recentHitsGiven.add({targetEntityId, std::move(damageRequest)});
}
void StatusController::damagedOther(DamageNotification damageNotification) {
- m_recentDamageGiven.add(move(damageNotification));
+ m_recentDamageGiven.add(std::move(damageNotification));
}
List<DamageNotification> StatusController::pullSelfDamageNotifications() {
@@ -367,10 +367,10 @@ List<DamageNotification> StatusController::pullSelfDamageNotifications() {
}
void StatusController::applySelfDamageRequest(DamageRequest dr) {
- auto damageNotifications = applyDamageRequest(move(dr));
+ auto damageNotifications = applyDamageRequest(std::move(dr));
for (auto const& dn : damageNotifications)
m_recentDamageTaken.add(dn);
- m_pendingSelfDamageNotifications.appendAll(move(damageNotifications));
+ m_pendingSelfDamageNotifications.appendAll(std::move(damageNotifications));
}
pair<List<DamageNotification>, uint64_t> StatusController::damageTakenSince(uint64_t since) const {
@@ -514,7 +514,7 @@ void StatusController::tickMaster(float dt) {
for (auto const& pair : m_uniqueEffects)
parentDirectives.append(pair.second.parentDirectives);
- m_parentDirectives.set(move(parentDirectives));
+ m_parentDirectives.set(std::move(parentDirectives));
updateAnimators(dt);
}
@@ -570,7 +570,7 @@ Maybe<Json> StatusController::receiveMessage(String const& message, bool localMe
}
StatusController::EffectAnimator::EffectAnimator(Maybe<String> config) {
- animationConfig = move(config);
+ animationConfig = std::move(config);
animator = animationConfig ? NetworkedAnimator(*animationConfig) : NetworkedAnimator();
}
@@ -623,8 +623,8 @@ StatusController::UniqueEffectMetadata::UniqueEffectMetadata() {
StatusController::UniqueEffectMetadata::UniqueEffectMetadata(UniqueStatusEffect effect, Maybe<float> duration, Maybe<EntityId> sourceEntityId)
: UniqueEffectMetadata() {
- this->effect = move(effect);
- this->duration = move(duration);
+ this->effect = std::move(effect);
+ this->duration = std::move(duration);
this->maxDuration.set(this->duration.value());
this->sourceEntityId.set(sourceEntityId);
}
diff --git a/source/game/StarStoredFunctions.cpp b/source/game/StarStoredFunctions.cpp
index 0db0356..7905f66 100644
--- a/source/game/StarStoredFunctions.cpp
+++ b/source/game/StarStoredFunctions.cpp
@@ -10,7 +10,7 @@ StoredFunction::StoredFunction(ParametricFunction<double, double> data) {
if (data.empty())
throw StoredFunctionException("StoredFunction constructor called on function with no data points");
- m_function = move(data);
+ m_function = std::move(data);
// Determine whether the function is monotonically increasing, monotonically
// decreasing, totally flat (technically both monotonically increasing and
@@ -104,14 +104,14 @@ StoredFunction::SearchResult StoredFunction::search(double targetValue, double v
return result;
}
-StoredFunction2::StoredFunction2(MultiTable2D table) : table(move(table)) {}
+StoredFunction2::StoredFunction2(MultiTable2D table) : table(std::move(table)) {}
double StoredFunction2::evaluate(double x, double y) const {
return table.interpolate({x, y});
}
StoredConfigFunction::StoredConfigFunction(ParametricTable<int, Json> data) {
- m_data = move(data);
+ m_data = std::move(data);
}
Json StoredConfigFunction::get(double value) const {
diff --git a/source/game/StarSystemWorld.cpp b/source/game/StarSystemWorld.cpp
index 3708e46..c7e1213 100644
--- a/source/game/StarSystemWorld.cpp
+++ b/source/game/StarSystemWorld.cpp
@@ -116,7 +116,7 @@ SystemWorldConfig SystemWorldConfig::fromJson(Json const& json) {
}
SystemWorld::SystemWorld(ClockConstPtr universeClock, CelestialDatabasePtr celestialDatabase)
- : m_celestialDatabase(move(celestialDatabase)), m_universeClock(move(universeClock)) {
+ : m_celestialDatabase(std::move(celestialDatabase)), m_universeClock(std::move(universeClock)) {
m_config = SystemWorldConfig::fromJson(Root::singleton().assets()->json("/systemworld.config"));
}
@@ -317,13 +317,13 @@ Maybe<WarpAction> SystemWorld::objectWarpAction(Uuid const& uuid) const {
}
SystemObject::SystemObject(SystemObjectConfig config, Uuid uuid, Vec2F const& position, JsonObject parameters)
- : m_config(move(config)), m_uuid(move(uuid)), m_spawnTime(0.0f), m_parameters(move(parameters)) {
+ : m_config(std::move(config)), m_uuid(std::move(uuid)), m_spawnTime(0.0f), m_parameters(std::move(parameters)) {
setPosition(position);
init();
}
SystemObject::SystemObject(SystemObjectConfig config, Uuid uuid, Vec2F const& position, double spawnTime, JsonObject parameters)
- : m_config(move(config)), m_uuid(move(uuid)), m_spawnTime(move(spawnTime)), m_parameters(move(parameters)) {
+ : m_config(std::move(config)), m_uuid(std::move(uuid)), m_spawnTime(std::move(spawnTime)), m_parameters(std::move(parameters)) {
setPosition(position);
for (auto p : m_config.generatedParameters) {
if (!m_parameters.contains(p.first))
@@ -458,7 +458,7 @@ pair<ByteArray, uint64_t> SystemObject::writeNetState(uint64_t fromVersion) {
}
void SystemObject::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
ByteArray SystemObject::netStore() const {
@@ -489,7 +489,7 @@ void SystemObject::setPosition(Vec2F const& position) {
}
SystemClientShip::SystemClientShip(SystemWorld* system, Uuid uuid, float speed, SystemLocation const& location)
- : m_uuid(move(uuid)) {
+ : m_uuid(std::move(uuid)) {
m_systemLocation.set(location);
setPosition(system->systemLocationPosition(location).value({}));
@@ -620,7 +620,7 @@ pair<ByteArray, uint64_t> SystemClientShip::writeNetState(uint64_t fromVersion)
}
void SystemClientShip::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
ByteArray SystemClientShip::netStore() const {
diff --git a/source/game/StarSystemWorld.hpp b/source/game/StarSystemWorld.hpp
index c68bc59..ab0b63a 100644
--- a/source/game/StarSystemWorld.hpp
+++ b/source/game/StarSystemWorld.hpp
@@ -76,6 +76,8 @@ class SystemWorld {
public:
SystemWorld(ClockConstPtr universeClock, CelestialDatabasePtr celestialDatabase);
+ virtual ~SystemWorld() = default;
+
SystemWorldConfig const& systemConfig() const;
double time() const;
Vec3I location() const;
diff --git a/source/game/StarSystemWorldClient.cpp b/source/game/StarSystemWorldClient.cpp
index da28c98..eb25124 100644
--- a/source/game/StarSystemWorldClient.cpp
+++ b/source/game/StarSystemWorldClient.cpp
@@ -7,7 +7,7 @@
namespace Star {
SystemWorldClient::SystemWorldClient(ClockConstPtr universeClock, CelestialDatabasePtr celestialDatabase, PlayerUniverseMapPtr universeMap)
- : SystemWorld(universeClock, celestialDatabase), m_universeMap(move(universeMap)) {}
+ : SystemWorld(universeClock, celestialDatabase), m_universeMap(std::move(universeMap)) {}
CelestialCoordinate SystemWorldClient::currentSystem() const {
return CelestialCoordinate(m_location);
@@ -102,7 +102,7 @@ SystemClientShipPtr SystemWorldClient::getShip(Uuid const & uuid) const
Uuid SystemWorldClient::spawnObject(String typeName, Maybe<Vec2F> position, Maybe<Uuid> const& uuid, JsonObject overrides) {
Uuid objectUuid = uuid.value(Uuid());
- m_outgoingPackets.append(make_shared<SystemObjectSpawnPacket>(move(typeName), objectUuid, move(position), move(overrides)));
+ m_outgoingPackets.append(make_shared<SystemObjectSpawnPacket>(std::move(typeName), objectUuid, std::move(position), std::move(overrides)));
return objectUuid;
}
@@ -165,7 +165,7 @@ List<PacketPtr> SystemWorldClient::pullOutgoingPackets() {
}
SystemObjectPtr SystemWorldClient::netLoadObject(ByteArray netStore) {
- DataStreamBuffer ds(move(netStore));
+ DataStreamBuffer ds(std::move(netStore));
Uuid uuid = ds.read<Uuid>();
String name = ds.read<String>();
@@ -179,7 +179,7 @@ SystemObjectPtr SystemWorldClient::netLoadObject(ByteArray netStore) {
SystemClientShipPtr SystemWorldClient::netLoadShip(ByteArray netStore)
{
- DataStreamBuffer ds(move(netStore));
+ DataStreamBuffer ds(std::move(netStore));
Uuid uuid = ds.read<Uuid>();
SystemLocation location = ds.read<SystemLocation>();
return make_shared<SystemClientShip>(this, uuid, location);
diff --git a/source/game/StarSystemWorldServer.cpp b/source/game/StarSystemWorldServer.cpp
index 39a1aad..3b847eb 100644
--- a/source/game/StarSystemWorldServer.cpp
+++ b/source/game/StarSystemWorldServer.cpp
@@ -10,8 +10,8 @@
namespace Star {
SystemWorldServer::SystemWorldServer(Vec3I location, ClockConstPtr universeClock, CelestialDatabasePtr celestialDatabase)
- : SystemWorld(move(universeClock), move(celestialDatabase)) {
- m_location = move(location);
+ : SystemWorld(std::move(universeClock), std::move(celestialDatabase)) {
+ m_location = std::move(location);
placeInitialObjects();
@@ -21,7 +21,7 @@ SystemWorldServer::SystemWorldServer(Vec3I location, ClockConstPtr universeClock
}
SystemWorldServer::SystemWorldServer(Json const& diskStore, ClockConstPtr universeClock, CelestialDatabasePtr celestialDatabase)
- : SystemWorld(move(universeClock), move(celestialDatabase)) {
+ : SystemWorld(std::move(universeClock), std::move(celestialDatabase)) {
m_location = jsonToVec3I(diskStore.get("location"));
for (auto objectStore : diskStore.getArray("objects")) {
diff --git a/source/game/StarSystemWorldServerThread.cpp b/source/game/StarSystemWorldServerThread.cpp
index fb5cea5..4586889 100644
--- a/source/game/StarSystemWorldServerThread.cpp
+++ b/source/game/StarSystemWorldServerThread.cpp
@@ -7,7 +7,7 @@ namespace Star {
SystemWorldServerThread::SystemWorldServerThread(Vec3I const& location, SystemWorldServerPtr systemWorld, String storageFile)
: Thread(strf("SystemWorldServer: {}", location)), m_stop(false), m_storageFile(storageFile) {
m_systemLocation = location;
- m_systemWorld = move(systemWorld);
+ m_systemWorld = std::move(systemWorld);
}
SystemWorldServerThread::~SystemWorldServerThread() {
@@ -45,7 +45,7 @@ void SystemWorldServerThread::removeClient(ConnectionId clientId) {
}
void SystemWorldServerThread::setPause(shared_ptr<const atomic<bool>> pause) {
- m_pause = move(pause);
+ m_pause = std::move(pause);
}
void SystemWorldServerThread::run() {
@@ -125,7 +125,7 @@ void SystemWorldServerThread::setClientDestination(ConnectionId clientId, System
void SystemWorldServerThread::executeClientShipAction(ConnectionId clientId, ClientShipAction action) {
WriteLocker locker(m_queueMutex);
- m_clientShipActions.append({clientId, move(action)});
+ m_clientShipActions.append({clientId, std::move(action)});
}
SystemLocation SystemWorldServerThread::clientShipLocation(ConnectionId clientId) {
@@ -158,7 +158,7 @@ void SystemWorldServerThread::setUpdateAction(function<void(SystemWorldServerThr
void SystemWorldServerThread::pushIncomingPacket(ConnectionId clientId, PacketPtr packet) {
WriteLocker locker(m_queueMutex);
- m_incomingPacketQueue.append({move(clientId), move(packet)});
+ m_incomingPacketQueue.append({std::move(clientId), std::move(packet)});
}
List<PacketPtr> SystemWorldServerThread::pullOutgoingPackets(ConnectionId clientId) {
diff --git a/source/game/StarTeamClient.cpp b/source/game/StarTeamClient.cpp
index c1e2751..8bc6cfd 100644
--- a/source/game/StarTeamClient.cpp
+++ b/source/game/StarTeamClient.cpp
@@ -192,7 +192,7 @@ void TeamClient::forceUpdate() {
void TeamClient::invokeRemote(String const& method, Json const& args, function<void(Json const&)> responseFunction) {
auto promise = m_clientContext->rpcInterface()->invokeRemote(method, args);
- m_pendingResponses.append({move(promise), move(responseFunction)});
+ m_pendingResponses.append({std::move(promise), std::move(responseFunction)});
}
void TeamClient::handleRpcResponses() {
@@ -205,7 +205,7 @@ void TeamClient::handleRpcResponses() {
handler.second(*res);
}
} else {
- stillPendingResponses.append(move(handler));
+ stillPendingResponses.append(std::move(handler));
}
}
m_pendingResponses = stillPendingResponses;
diff --git a/source/game/StarTeamManager.cpp b/source/game/StarTeamManager.cpp
index d741963..d7c6c3d 100644
--- a/source/game/StarTeamManager.cpp
+++ b/source/game/StarTeamManager.cpp
@@ -24,7 +24,7 @@ JsonRpcHandlers TeamManager::rpcHandlers() {
}
void TeamManager::setConnectedPlayers(StringMap<List<Uuid>> const& connectedPlayers) {
- m_connectedPlayers = move(connectedPlayers);
+ m_connectedPlayers = std::move(connectedPlayers);
}
void TeamManager::playerDisconnected(Uuid const& playerUuid) {
diff --git a/source/game/StarTechController.cpp b/source/game/StarTechController.cpp
index f99a718..4ead428 100644
--- a/source/game/StarTechController.cpp
+++ b/source/game/StarTechController.cpp
@@ -277,7 +277,7 @@ List<Drawable> TechController::backDrawables() {
if (animator->isVisible()) {
for (auto& piece : animator->animator.drawablesWithZLevel(m_movementController->position())) {
if (piece.second < 0.0f)
- drawables.append(move(piece.first));
+ drawables.append(std::move(piece.first));
}
}
}
@@ -292,7 +292,7 @@ List<Drawable> TechController::frontDrawables() {
if (animator->isVisible()) {
for (auto& piece : animator->animator.drawablesWithZLevel(m_movementController->position())) {
if (piece.second >= 0.0f)
- drawables.append(move(piece.first));
+ drawables.append(std::move(piece.first));
}
}
}
@@ -346,7 +346,7 @@ Maybe<Json> TechController::receiveMessage(String const& message, bool localMess
}
TechController::TechAnimator::TechAnimator(Maybe<String> ac) {
- animationConfig = move(ac);
+ animationConfig = std::move(ac);
animator = animationConfig ? NetworkedAnimator(*animationConfig) : NetworkedAnimator();
netGroup.addNetElement(&animator);
netGroup.addNetElement(&visible);
@@ -511,7 +511,7 @@ LuaCallbacks TechController::makeTechCallbacks(TechModule& techModule) {
DirectivesGroup newParentDirectives;
for (auto& module : m_techModules)
newParentDirectives.append(module.parentDirectives);
- m_parentDirectives.set(move(newParentDirectives));
+ m_parentDirectives.set(std::move(newParentDirectives));
});
callbacks.registerCallback("setParentHidden", [this](bool hidden) {
diff --git a/source/game/StarTerrainDatabase.cpp b/source/game/StarTerrainDatabase.cpp
index a2b33fd..1a6bbb2 100644
--- a/source/game/StarTerrainDatabase.cpp
+++ b/source/game/StarTerrainDatabase.cpp
@@ -50,7 +50,7 @@ TerrainSelectorParameters TerrainSelectorParameters::withCommonality(float commo
}
TerrainSelector::TerrainSelector(String type, Json config, TerrainSelectorParameters parameters)
- : type(move(type)), config(move(config)), parameters(move(parameters)) {}
+ : type(std::move(type)), config(std::move(config)), parameters(std::move(parameters)) {}
TerrainSelector::~TerrainSelector() {}
diff --git a/source/game/StarTileSectorArray.hpp b/source/game/StarTileSectorArray.hpp
index 40378db..fb96229 100644
--- a/source/game/StarTileSectorArray.hpp
+++ b/source/game/StarTileSectorArray.hpp
@@ -146,7 +146,7 @@ TileSectorArray<Tile, SectorSize>::TileSectorArray() {}
template <typename Tile, unsigned SectorSize>
TileSectorArray<Tile, SectorSize>::TileSectorArray(Vec2U const& size, Tile defaultTile) {
- init(size, move(defaultTile));
+ init(size, std::move(defaultTile));
}
template <typename Tile, unsigned SectorSize>
@@ -154,7 +154,7 @@ void TileSectorArray<Tile, SectorSize>::init(Vec2U const& size, Tile defaultTile
m_worldSize = size;
// Initialize to enough sectors to fit world size at least.
m_tileSectors.init((size[0] + SectorSize - 1) / SectorSize, (size[1] + SectorSize - 1) / SectorSize);
- m_default = move(defaultTile);
+ m_default = std::move(defaultTile);
}
template <typename Tile, unsigned SectorSize>
@@ -210,13 +210,13 @@ auto TileSectorArray<Tile, SectorSize>::adjacentSector(Sector const& sector, Vec
template <typename Tile, unsigned SectorSize>
void TileSectorArray<Tile, SectorSize>::loadSector(Sector const& sector, ArrayPtr tile) {
if (sectorValid(sector))
- m_tileSectors.loadSector(sector, move(tile));
+ m_tileSectors.loadSector(sector, std::move(tile));
}
template <typename Tile, unsigned SectorSize>
void TileSectorArray<Tile, SectorSize>::loadDefaultSector(Sector const& sector) {
if (sectorValid(sector))
- m_tileSectors.loadSector(sector, make_unique<Array>(m_default));
+ m_tileSectors.loadSector(sector, std::make_unique<Array>(m_default));
}
template <typename Tile, unsigned SectorSize>
diff --git a/source/game/StarToolUser.cpp b/source/game/StarToolUser.cpp
index dd6f5ff..c9bd068 100644
--- a/source/game/StarToolUser.cpp
+++ b/source/game/StarToolUser.cpp
@@ -285,18 +285,18 @@ void ToolUser::setupHumanoidHandItemDrawables(Humanoid& humanoid) const {
auto setRotated = [&](String const& backFrameOverride, String const& frontFrameOverride, List<Drawable> drawables, bool twoHanded) {
if (primary || twoHanded) {
humanoid.setPrimaryHandFrameOverrides(backFrameOverride, frontFrameOverride);
- humanoid.setPrimaryHandDrawables(move(drawables));
+ humanoid.setPrimaryHandDrawables(std::move(drawables));
} else {
humanoid.setAltHandFrameOverrides(backFrameOverride, frontFrameOverride);
- humanoid.setAltHandDrawables(move(drawables));
+ humanoid.setAltHandDrawables(std::move(drawables));
}
};
auto setNonRotated = [&](List<Drawable> drawables) {
if (primary)
- humanoid.setPrimaryHandNonRotatedDrawables(move(drawables));
+ humanoid.setPrimaryHandNonRotatedDrawables(std::move(drawables));
else
- humanoid.setAltHandNonRotatedDrawables(move(drawables));
+ humanoid.setAltHandNonRotatedDrawables(std::move(drawables));
};
ItemPtr handItem = primary ? m_primaryHandItem.get() : m_altHandItem.get();
@@ -584,8 +584,8 @@ void ToolUser::setItems(ItemPtr newPrimaryHandItem, ItemPtr newAltHandItem) {
if (m_altHandItem.get() != newAltHandItem)
m_fireAlt = false;
- m_primaryHandItem.set(move(newPrimaryHandItem));
- m_altHandItem.set(move(newAltHandItem));
+ m_primaryHandItem.set(std::move(newPrimaryHandItem));
+ m_altHandItem.set(std::move(newAltHandItem));
initPrimaryHandItem();
initAltHandItem();
@@ -737,7 +737,7 @@ ItemPtr const& ToolUser::NetItem::get() const {
void ToolUser::NetItem::set(ItemPtr item) {
if (m_item != item) {
- m_item = move(item);
+ m_item = std::move(item);
m_newItem = true;
if (auto netItem = as<NetElement>(m_item.get())) {
netItem->initNetVersion(m_netVersion);
diff --git a/source/game/StarTreasure.cpp b/source/game/StarTreasure.cpp
index 2efca99..7493d62 100644
--- a/source/game/StarTreasure.cpp
+++ b/source/game/StarTreasure.cpp
@@ -65,7 +65,7 @@ TreasureDatabase::TreasureDatabase() {
itemPool.levelVariance = jsonToVec2F(config.get("levelVariance", JsonArray{0, 0}));
itemPool.allowDuplication = config.getBool("allowDuplication", true);
- treasurePool.addPoint(startLevel, move(itemPool));
+ treasurePool.addPoint(startLevel, std::move(itemPool));
}
}
}
diff --git a/source/game/StarUniverseClient.cpp b/source/game/StarUniverseClient.cpp
index f355965..6f089d4 100644
--- a/source/game/StarUniverseClient.cpp
+++ b/source/game/StarUniverseClient.cpp
@@ -29,8 +29,8 @@ namespace Star {
UniverseClient::UniverseClient(PlayerStoragePtr playerStorage, StatisticsPtr statistics) {
m_storageTriggerDeadline = 0;
- m_playerStorage = move(playerStorage);
- m_statistics = move(statistics);
+ m_playerStorage = std::move(playerStorage);
+ m_statistics = std::move(statistics);
m_pause = false;
m_luaRoot = make_shared<LuaRoot>();
reset();
@@ -127,8 +127,8 @@ Maybe<String> UniverseClient::connect(UniverseConnection connection, bool allowA
for (auto& pair : m_luaCallbacks)
m_worldClient->setLuaCallbacks(pair.first, pair.second);
- m_connection = move(connection);
- m_celestialDatabase = make_shared<CelestialSlaveDatabase>(move(success->celestialInformation));
+ m_connection = std::move(connection);
+ m_celestialDatabase = make_shared<CelestialSlaveDatabase>(std::move(success->celestialInformation));
m_systemWorldClient = make_shared<SystemWorldClient>(m_universeClock, m_celestialDatabase, m_mainPlayer->universeMap());
Logger::info("UniverseClient: Joined {} server as client {}", m_legacyServer ? "Starbound" : "OpenStarbound", success->clientId);
@@ -246,11 +246,11 @@ void UniverseClient::update(float dt) {
auto contextUpdate = m_clientContext->writeUpdate();
if (!contextUpdate.empty())
- m_connection->pushSingle(make_shared<ClientContextUpdatePacket>(move(contextUpdate)));
+ m_connection->pushSingle(make_shared<ClientContextUpdatePacket>(std::move(contextUpdate)));
auto celestialRequests = m_celestialDatabase->pullRequests();
if (!celestialRequests.empty())
- m_connection->pushSingle(make_shared<CelestialRequestPacket>(move(celestialRequests)));
+ m_connection->pushSingle(make_shared<CelestialRequestPacket>(std::move(celestialRequests)));
m_connection->send();
@@ -276,7 +276,7 @@ void UniverseClient::update(float dt) {
{"species", m_mainPlayer->species()},
{"mode", PlayerModeNames.getRight(m_mainPlayer->modeType())}
});
- m_mainPlayer->setPendingCinematic(Json(move(cinematic)));
+ m_mainPlayer->setPendingCinematic(Json(std::move(cinematic)));
if (!m_worldClient->respawnInWorld())
m_pendingWarp = WarpAlias::OwnShip;
m_warpDelay.reset();
@@ -651,7 +651,7 @@ void UniverseClient::handlePackets(List<PacketPtr> const& packets) {
break; // Stop handling other packets
} else if (auto celestialResponse = as<CelestialResponsePacket>(packet)) {
- m_celestialDatabase->pushResponses(move(celestialResponse->responses));
+ m_celestialDatabase->pushResponses(std::move(celestialResponse->responses));
} else if (auto warpResult = as<PlayerWarpResultPacket>(packet)) {
if (m_mainPlayer->isDeploying() && m_warping && m_warping->is<WarpToPlayer>()) {
diff --git a/source/game/StarUniverseConnection.cpp b/source/game/StarUniverseConnection.cpp
index f3c2b28..18b6da9 100644
--- a/source/game/StarUniverseConnection.cpp
+++ b/source/game/StarUniverseConnection.cpp
@@ -6,10 +6,10 @@ namespace Star {
static const int PacketSocketPollSleep = 1;
UniverseConnection::UniverseConnection(PacketSocketUPtr packetSocket)
- : m_packetSocket(move(packetSocket)) {}
+ : m_packetSocket(std::move(packetSocket)) {}
UniverseConnection::UniverseConnection(UniverseConnection&& rhs) {
- operator=(move(rhs));
+ operator=(std::move(rhs));
}
UniverseConnection::~UniverseConnection() {
@@ -37,12 +37,12 @@ void UniverseConnection::close() {
void UniverseConnection::push(List<PacketPtr> packets) {
MutexLocker locker(m_mutex);
- m_sendQueue.appendAll(move(packets));
+ m_sendQueue.appendAll(std::move(packets));
}
void UniverseConnection::pushSingle(PacketPtr packet) {
MutexLocker locker(m_mutex);
- m_sendQueue.append(move(packet));
+ m_sendQueue.append(std::move(packet));
}
List<PacketPtr> UniverseConnection::pull() {
@@ -122,7 +122,7 @@ Maybe<PacketStats> UniverseConnection::outgoingStats() const {
}
UniverseConnectionServer::UniverseConnectionServer(PacketReceiveCallback packetReceiver)
- : m_packetReceiver(move(packetReceiver)), m_shutdown(false) {
+ : m_packetReceiver(std::move(packetReceiver)), m_shutdown(false) {
m_processingLoop = Thread::invoke("UniverseConnectionServer::processingLoop", [this]() {
RecursiveMutexLocker connectionsLocker(m_connectionsMutex);
try {
@@ -152,7 +152,7 @@ UniverseConnectionServer::UniverseConnectionServer(PacketReceiveCallback packetR
connectionLocker.unlock();
try {
- m_packetReceiver(this, p.first, move(toReceive));
+ m_packetReceiver(this, p.first, std::move(toReceive));
} catch (std::exception const& e) {
Logger::error("Exception caught handling incoming server packets, disconnecting client '{}' {}", p.first, outputException(e, true));
@@ -215,11 +215,11 @@ void UniverseConnectionServer::addConnection(ConnectionId clientId, UniverseConn
throw UniverseConnectionException::format("Client '{}' already exists in UniverseConnectionServer::addConnection", clientId);
auto connection = make_shared<Connection>();
- connection->packetSocket = move(uc.m_packetSocket);
- connection->sendQueue = move(uc.m_sendQueue);
- connection->receiveQueue = move(uc.m_receiveQueue);
+ connection->packetSocket = std::move(uc.m_packetSocket);
+ connection->sendQueue = std::move(uc.m_sendQueue);
+ connection->receiveQueue = std::move(uc.m_receiveQueue);
connection->lastActivityTime = Time::monotonicMilliseconds();
- m_connections.add(clientId, move(connection));
+ m_connections.add(clientId, std::move(connection));
}
UniverseConnection UniverseConnectionServer::removeConnection(ConnectionId clientId) {
@@ -232,8 +232,8 @@ UniverseConnection UniverseConnectionServer::removeConnection(ConnectionId clien
UniverseConnection uc;
uc.m_packetSocket = take(conn->packetSocket);
- uc.m_sendQueue = move(conn->sendQueue);
- uc.m_receiveQueue = move(conn->receiveQueue);
+ uc.m_sendQueue = std::move(conn->sendQueue);
+ uc.m_receiveQueue = std::move(conn->receiveQueue);
return uc;
}
@@ -249,7 +249,7 @@ void UniverseConnectionServer::sendPackets(ConnectionId clientId, List<PacketPtr
RecursiveMutexLocker connectionsLocker(m_connectionsMutex);
if (auto conn = m_connections.value(clientId)) {
MutexLocker connectionLocker(conn->mutex);
- conn->sendQueue.appendAll(move(packets));
+ conn->sendQueue.appendAll(std::move(packets));
if (conn->packetSocket->isOpen()) {
conn->packetSocket->sendPackets(take(conn->sendQueue));
diff --git a/source/game/StarUniverseServer.cpp b/source/game/StarUniverseServer.cpp
index 3b04358..783bde2 100644
--- a/source/game/StarUniverseServer.cpp
+++ b/source/game/StarUniverseServer.cpp
@@ -112,15 +112,15 @@ void UniverseServer::addClient(UniverseConnection remoteConnection) {
RecursiveMutexLocker locker(m_mainLock);
// Binding requires us to make the given lambda copy constructible, so the
// make_shared is requried here.
- m_connectionAcceptThreads.append(Thread::invoke("UniverseServer::acceptConnection", [this, conn = make_shared<UniverseConnection>(move(remoteConnection))]() {
- acceptConnection(move(*conn), {});
+ m_connectionAcceptThreads.append(Thread::invoke("UniverseServer::acceptConnection", [this, conn = make_shared<UniverseConnection>(std::move(remoteConnection))]() {
+ acceptConnection(std::move(*conn), {});
}));
}
UniverseConnection UniverseServer::addLocalClient() {
auto pair = LocalPacketSocket::openPair();
- addClient(UniverseConnection(move(pair.first)));
- return UniverseConnection(move(pair.second));
+ addClient(UniverseConnection(std::move(pair.first)));
+ return UniverseConnection(std::move(pair.second));
}
void UniverseServer::stop() {
@@ -274,7 +274,7 @@ RpcThreadPromise<Json> UniverseServer::sendWorldMessage(WorldId const& worldId,
void UniverseServer::clientWarpPlayer(ConnectionId clientId, WarpAction action, bool deploy) {
RecursiveMutexLocker locker(m_mainLock);
- m_pendingPlayerWarps[clientId] = pair<WarpAction, bool>(move(action), move(deploy));
+ m_pendingPlayerWarps[clientId] = pair<WarpAction, bool>(std::move(action), std::move(deploy));
}
void UniverseServer::clientFlyShip(ConnectionId clientId, Vec3I const& system, SystemLocation const& location) {
@@ -402,7 +402,7 @@ bool UniverseServer::unbanIp(String const& addressString) {
if (addressLookup.isLeft()) {
return false;
} else {
- HostAddress address = move(addressLookup.right());
+ HostAddress address = std::move(addressLookup.right());
String cleanAddressString = toString(address);
bool entryFound = false;
@@ -1003,7 +1003,7 @@ void UniverseServer::respondToCelestialRequests() {
return false;
});
if (m_clients.contains(p.first))
- m_connectionServer->sendPackets(p.first, {make_shared<CelestialResponsePacket>(move(responses))});
+ m_connectionServer->sendPackets(p.first, {make_shared<CelestialResponsePacket>(std::move(responses))});
}
eraseWhere(m_pendingCelestialRequests, [](auto const& p) {
return p.second.empty();
@@ -1062,7 +1062,7 @@ void UniverseServer::handleWorldMessages() {
auto& world = *worldResult;
if (world)
- world->passMessages(move(it->second));
+ world->passMessages(std::move(it->second));
else for (auto& message : it->second)
message.promise.fail("Error creating world");
@@ -1455,14 +1455,14 @@ void UniverseServer::addCelestialRequests(ConnectionId clientId, List<CelestialR
void UniverseServer::worldUpdated(WorldServerThread* server) {
for (auto clientId : server->clients()) {
auto packets = server->pullOutgoingPackets(clientId);
- m_connectionServer->sendPackets(clientId, move(packets));
+ m_connectionServer->sendPackets(clientId, std::move(packets));
}
}
void UniverseServer::systemWorldUpdated(SystemWorldServerThread* systemWorldServer) {
for (auto clientId : systemWorldServer->clients()) {
auto packets = systemWorldServer->pullOutgoingPackets(clientId);
- m_connectionServer->sendPackets(clientId, move(packets));
+ m_connectionServer->sendPackets(clientId, std::move(packets));
}
}
@@ -1480,23 +1480,23 @@ void UniverseServer::packetsReceived(UniverseConnectionServer*, ConnectionId cli
} else if (auto chatSend = as<ChatSendPacket>(packet)) {
RecursiveMutexLocker locker(m_mainLock);
- m_pendingChat[clientId].append({move(chatSend->text), chatSend->sendMode});
+ m_pendingChat[clientId].append({std::move(chatSend->text), chatSend->sendMode});
} else if (auto clientContextUpdatePacket = as<ClientContextUpdatePacket>(packet)) {
- clientContext->readUpdate(move(clientContextUpdatePacket->updateData));
+ clientContext->readUpdate(std::move(clientContextUpdatePacket->updateData));
} else if (auto clientDisconnectPacket = as<ClientDisconnectRequestPacket>(packet)) {
disconnectClient(clientId, String());
} else if (auto celestialRequest = as<CelestialRequestPacket>(packet)) {
- addCelestialRequests(clientId, move(celestialRequest->requests));
+ addCelestialRequests(clientId, std::move(celestialRequest->requests));
} else if (is<SystemObjectSpawnPacket>(packet)) {
if (auto currentSystem = clientContext->systemWorld())
- currentSystem->pushIncomingPacket(clientId, move(packet));
+ currentSystem->pushIncomingPacket(clientId, std::move(packet));
} else {
if (auto currentWorld = clientContext->playerWorld())
- currentWorld->pushIncomingPackets(clientId, {move(packet)});
+ currentWorld->pushIncomingPackets(clientId, {std::move(packet)});
}
}
}
@@ -1533,7 +1533,7 @@ void UniverseServer::acceptConnection(UniverseConnection connection, Maybe<HostA
connection.pushSingle(protocolResponse);
connection.sendAll(clientWaitLimit);
mainLocker.lock();
- m_deadConnections.append({move(connection), Time::monotonicMilliseconds()});
+ m_deadConnections.append({std::move(connection), Time::monotonicMilliseconds()});
return;
}
@@ -1550,7 +1550,7 @@ void UniverseServer::acceptConnection(UniverseConnection connection, Maybe<HostA
Logger::warn("UniverseServer: client connection aborted");
connection.pushSingle(make_shared<ConnectFailurePacket>("connect timeout"));
mainLocker.lock();
- m_deadConnections.append({move(connection), Time::monotonicMilliseconds()});
+ m_deadConnections.append({std::move(connection), Time::monotonicMilliseconds()});
return;
}
@@ -1561,9 +1561,9 @@ void UniverseServer::acceptConnection(UniverseConnection connection, Maybe<HostA
auto connectionFail = [&](String message) {
Logger::warn("UniverseServer: Login attempt failed with account '{}' as player '{}' from address {}, error: {}",
accountString, clientConnect->playerName, remoteAddressString, message);
- connection.pushSingle(make_shared<ConnectFailurePacket>(move(message)));
+ connection.pushSingle(make_shared<ConnectFailurePacket>(std::move(message)));
mainLocker.lock();
- m_deadConnections.append({move(connection), Time::monotonicMilliseconds()});
+ m_deadConnections.append({std::move(connection), Time::monotonicMilliseconds()});
};
if (!remoteAddress) {
@@ -1672,7 +1672,7 @@ void UniverseServer::acceptConnection(UniverseConnection connection, Maybe<HostA
clientContext->setShipUpgrades(clientConnect->shipUpgrades);
- m_connectionServer->addConnection(clientId, move(connection));
+ m_connectionServer->addConnection(clientId, std::move(connection));
m_chatProcessor->connectClient(clientId, clientConnect->playerName);
m_connectionServer->sendPackets(clientId, {
diff --git a/source/game/StarVehicle.cpp b/source/game/StarVehicle.cpp
index f8eeef1..a253de1 100644
--- a/source/game/StarVehicle.cpp
+++ b/source/game/StarVehicle.cpp
@@ -13,7 +13,7 @@
namespace Star {
Vehicle::Vehicle(Json baseConfig, String path, Json dynamicConfig)
- : m_baseConfig(move(baseConfig)), m_path(move(path)), m_dynamicConfig(move(dynamicConfig)) {
+ : m_baseConfig(std::move(baseConfig)), m_path(std::move(path)), m_dynamicConfig(std::move(dynamicConfig)) {
m_typeName = m_baseConfig.getString("name");
@@ -247,7 +247,7 @@ pair<ByteArray, uint64_t> Vehicle::writeNetState(uint64_t fromVersion) {
}
void Vehicle::readNetState(ByteArray data, float interpolationTime) {
- m_netGroup.readNetState(move(data), interpolationTime);
+ m_netGroup.readNetState(std::move(data), interpolationTime);
}
void Vehicle::enableInterpolation(float extrapolationHint) {
@@ -296,7 +296,7 @@ void Vehicle::update(float dt, uint64_t) {
JsonArray allControlsHeld = transform<JsonArray>(p.second.slaveNewControls, [](LoungeControl control) {
return LoungeControlNames.getRight(control);
});
- world()->sendEntityMessage(entityId(), "control_all", {*m_loungePositions.indexOf(p.first), move(allControlsHeld)});
+ world()->sendEntityMessage(entityId(), "control_all", {*m_loungePositions.indexOf(p.first), std::move(allControlsHeld)});
} else {
for (auto control : p.second.slaveNewControls.difference(p.second.slaveOldControls))
world()->sendEntityMessage(entityId(), "control_on", {*m_loungePositions.indexOf(p.first), LoungeControlNames.getRight(control)});
@@ -323,9 +323,9 @@ void Vehicle::update(float dt, uint64_t) {
void Vehicle::render(RenderCallback* renderer) {
for (auto& drawable : m_networkedAnimator.drawablesWithZLevel(position())) {
if (drawable.second < 0.0f)
- renderer->addDrawable(move(drawable.first), renderLayer(VehicleLayer::Back));
+ renderer->addDrawable(std::move(drawable.first), renderLayer(VehicleLayer::Back));
else
- renderer->addDrawable(move(drawable.first), renderLayer(VehicleLayer::Front));
+ renderer->addDrawable(std::move(drawable.first), renderLayer(VehicleLayer::Front));
}
renderer->addAudios(m_networkedAnimatorDynamicTarget.pullNewAudios());
@@ -500,7 +500,7 @@ List<PhysicsForceRegion> Vehicle::forceRegions() const {
}
forceRegion.call([translatePos](auto& fr) { fr.translate(translatePos); });
- forces.append(move(forceRegion));
+ forces.append(std::move(forceRegion));
}
}
return forces;
@@ -520,7 +520,7 @@ List<DamageSource> Vehicle::damageSources() const {
damageSource.team = m_damageTeam.get();
damageSource.sourceEntityId = entityId();
- sources.append(move(damageSource));
+ sources.append(std::move(damageSource));
}
}
return sources;
@@ -597,15 +597,15 @@ LuaCallbacks Vehicle::makeVehicleCallbacks() {
});
callbacks.registerCallback("setLoungeEmote", [this](String const& name, Maybe<String> emote) {
- m_loungePositions.get(name).emote.set(move(emote));
+ m_loungePositions.get(name).emote.set(std::move(emote));
});
callbacks.registerCallback("setLoungeDance", [this](String const& name, Maybe<String> dance) {
- m_loungePositions.get(name).dance.set(move(dance));
+ m_loungePositions.get(name).dance.set(std::move(dance));
});
callbacks.registerCallback("setLoungeDirectives", [this](String const& name, Maybe<String> directives) {
- m_loungePositions.get(name).directives.set(move(directives));
+ m_loungePositions.get(name).directives.set(std::move(directives));
});
callbacks.registerCallback("setLoungeStatusEffects", [this](String const& name, JsonArray const& statusEffects) {
@@ -641,14 +641,14 @@ LuaCallbacks Vehicle::makeVehicleCallbacks() {
});
callbacks.registerCallback("setAnimationParameter", [this](String name, Json value) {
- m_scriptedAnimationParameters.set(move(name), move(value));
+ m_scriptedAnimationParameters.set(std::move(name), std::move(value));
});
return callbacks;
}
Json Vehicle::configValue(String const& name, Json def) const {
- return jsonMergeQueryDef(name, move(def), m_baseConfig, m_dynamicConfig);
+ return jsonMergeQueryDef(name, std::move(def), m_baseConfig, m_dynamicConfig);
}
}
diff --git a/source/game/StarVehicleDatabase.cpp b/source/game/StarVehicleDatabase.cpp
index 4c22963..a5f923d 100644
--- a/source/game/StarVehicleDatabase.cpp
+++ b/source/game/StarVehicleDatabase.cpp
@@ -18,7 +18,7 @@ VehicleDatabase::VehicleDatabase() {
if (m_vehicles.contains(name))
throw VehicleDatabaseException::format("Repeat vehicle name '{}'", name);
- m_vehicles.add(move(name), make_pair(move(file), move(config)));
+ m_vehicles.add(std::move(name), make_pair(std::move(file), std::move(config)));
} catch (StarException const& e) {
throw VehicleDatabaseException(strf("Error loading vehicle '{}'", file), e);
}
diff --git a/source/game/StarWarping.cpp b/source/game/StarWarping.cpp
index 8268b16..bfbf9fd 100644
--- a/source/game/StarWarping.cpp
+++ b/source/game/StarWarping.cpp
@@ -15,7 +15,7 @@ EnumMap<WarpMode> WarpModeNames {
InstanceWorldId::InstanceWorldId() {}
InstanceWorldId::InstanceWorldId(String instance, Maybe<Uuid> uuid, Maybe<float> level)
- : instance(move(instance)), uuid(move(uuid)), level(move(level)) {}
+ : instance(std::move(instance)), uuid(std::move(uuid)), level(std::move(level)) {}
bool InstanceWorldId::operator==(InstanceWorldId const& rhs) const {
return tie(instance, uuid, level) == tie(rhs.instance, rhs.uuid, rhs.level);
@@ -158,7 +158,7 @@ String printSpawnTarget(SpawnTarget spawnTarget) {
WarpToWorld::WarpToWorld() {}
-WarpToWorld::WarpToWorld(WorldId world, SpawnTarget target) : world(move(world)), target(move(target)) {}
+WarpToWorld::WarpToWorld(WorldId world, SpawnTarget target) : world(std::move(world)), target(std::move(target)) {}
WarpToWorld::WarpToWorld(Json v) {
if (v) {
diff --git a/source/game/StarWeather.cpp b/source/game/StarWeather.cpp
index 010893a..6b1c6a7 100644
--- a/source/game/StarWeather.cpp
+++ b/source/game/StarWeather.cpp
@@ -44,7 +44,7 @@ void ServerWeather::setup(WeatherPool weatherPool, float undergroundLevel, World
}
void ServerWeather::setReferenceClock(ClockConstPtr referenceClock) {
- m_referenceClock = move(referenceClock);
+ m_referenceClock = std::move(referenceClock);
if (m_referenceClock)
m_clockTrackingTime = m_referenceClock->time();
else
@@ -52,7 +52,7 @@ void ServerWeather::setReferenceClock(ClockConstPtr referenceClock) {
}
void ServerWeather::setClientVisibleRegions(List<RectI> regions) {
- m_clientVisibleRegions = move(regions);
+ m_clientVisibleRegions = std::move(regions);
}
pair<ByteArray, uint64_t> ServerWeather::writeUpdate(uint64_t fromVersion) {
@@ -265,7 +265,7 @@ void ClientWeather::setup(WorldGeometry worldGeometry, WeatherEffectsActiveQuery
void ClientWeather::readUpdate(ByteArray data) {
if (!data.empty()) {
- m_netGroup.readNetState(move(data));
+ m_netGroup.readNetState(std::move(data));
getNetStates();
}
}
@@ -352,7 +352,7 @@ void ClientWeather::spawnWeatherParticles(RectF newClientRegion, float dt) {
if (y > m_undergroundLevel && (!m_weatherEffectsActiveQuery || m_weatherEffectsActiveQuery(Vec2I::floor(newParticle.position)))) {
if (particleConfig.autoRotate)
newParticle.rotation += angleChange;
- m_particles.append(move(newParticle));
+ m_particles.append(std::move(newParticle));
}
}
}
diff --git a/source/game/StarWeatherTypes.cpp b/source/game/StarWeatherTypes.cpp
index 5cb12e8..9108dc3 100644
--- a/source/game/StarWeatherTypes.cpp
+++ b/source/game/StarWeatherTypes.cpp
@@ -24,7 +24,7 @@ WeatherType::WeatherType(Json config, String path) {
config.particle = Particle(v.get("particle"), path);
config.density = v.getFloat("density");
config.autoRotate = v.getBool("autoRotate", false);
- particles.append(move(config));
+ particles.append(std::move(config));
}
for (auto v : config.getArray("projectiles", JsonArray())) {
@@ -36,7 +36,7 @@ WeatherType::WeatherType(Json config, String path) {
config.spawnAboveRegion = v.getInt("spawnAboveRegion");
config.spawnHorizontalPad = v.getInt("spawnHorizontalPad");
config.windAffectAmount = v.getFloat("windAffectAmount", 0.0f);
- projectiles.append(move(config));
+ projectiles.append(std::move(config));
}
maximumWind = config.getFloat("maximumWind", 0.0f);
diff --git a/source/game/StarWorldClient.cpp b/source/game/StarWorldClient.cpp
index b2a79fb..b4244b0 100644
--- a/source/game/StarWorldClient.cpp
+++ b/source/game/StarWorldClient.cpp
@@ -163,13 +163,13 @@ void WorldClient::removeEntity(EntityId entityId, bool andDie) {
p.directives.append(directives->get(directiveIndex));
}
- m_particles->addParticles(move(renderCallback.particles));
- m_samples.appendAll(move(renderCallback.audios));
+ m_particles->addParticles(std::move(renderCallback.particles));
+ m_samples.appendAll(std::move(renderCallback.audios));
}
if (auto version = m_masterEntitiesNetVersion.maybeTake(entity->entityId())) {
ByteArray finalNetState = entity->writeNetState(*version).first;
- m_outgoingPackets.append(make_shared<EntityDestroyPacket>(entity->entityId(), move(finalNetState), andDie));
+ m_outgoingPackets.append(make_shared<EntityDestroyPacket>(entity->entityId(), std::move(finalNetState), andDie));
}
m_entityMap->removeEntity(entityId);
@@ -356,7 +356,7 @@ TileModificationList WorldClient::applyTileModifications(TileModificationList co
failures.append(pair);
}
if (yay) {
- list = &(temp = move(failures));
+ list = &(temp = std::move(failures));
failures = {};
continue;
}
@@ -364,7 +364,7 @@ TileModificationList WorldClient::applyTileModifications(TileModificationList co
}
if (!success.empty())
- m_outgoingPackets.append(make_shared<ModifyTileListPacket>(move(success), true));
+ m_outgoingPackets.append(make_shared<ModifyTileListPacket>(std::move(success), true));
return failures;
}
@@ -440,7 +440,7 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
entity->renderLightSources(&lightingRenderCallback);
});
- renderLightSources = move(lightingRenderCallback.lightSources);
+ renderLightSources = std::move(lightingRenderCallback.lightSources);
RectI window = m_clientState.window();
RectI tileRange = window.padded(bufferTiles);
@@ -519,7 +519,7 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
d.imagePart().addDirectives(directives->at(directiveIndex), true);
}
}
- ed.layers[p.first] = move(p.second);
+ ed.layers[p.first] = std::move(p.second);
}
if (m_interactiveHighlightMode || (!inspecting && entity->entityId() == playerAimInteractive)) {
@@ -535,7 +535,7 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
ed.highlightEffect.level *= inspectionFlickerMultiplier;
}
}
- renderData.entityDrawables.append(move(ed));
+ renderData.entityDrawables.append(std::move(ed));
if (directives) {
int directiveIndex = unsigned(entity->entityId()) % directives->size();
@@ -543,10 +543,10 @@ void WorldClient::render(WorldRenderData& renderData, unsigned bufferTiles) {
p.directives.append(directives->get(directiveIndex));
}
- m_particles->addParticles(move(renderCallback.particles));
- m_samples.appendAll(move(renderCallback.audios));
- previewTiles.appendAll(move(renderCallback.previewTiles));
- renderData.overheadBars.appendAll(move(renderCallback.overheadBars));
+ m_particles->addParticles(std::move(renderCallback.particles));
+ m_samples.appendAll(std::move(renderCallback.audios));
+ previewTiles.appendAll(std::move(renderCallback.previewTiles));
+ renderData.overheadBars.appendAll(std::move(renderCallback.overheadBars));
}, [](EntityPtr const& a, EntityPtr const& b) {
return a->entityId() < b->entityId();
@@ -1141,7 +1141,7 @@ void WorldClient::update(float dt) {
});
m_clientState.setPlayer(m_mainPlayer->entityId());
- m_clientState.setClientPresenceEntities(move(clientPresenceEntities));
+ m_clientState.setClientPresenceEntities(std::move(clientPresenceEntities));
m_damageManager->update(dt);
handleDamageNotifications();
@@ -1345,12 +1345,12 @@ TileDamageResult WorldClient::damageTiles(List<Vec2I> const& pos, TileLayer laye
if (toDing.size()) {
auto dingDamage = tileDamage;
dingDamage.type = TileDamageType::Protected;
- m_outgoingPackets.append(make_shared<DamageTileGroupPacket>(move(toDing), layer, sourcePosition, dingDamage, Maybe<EntityId>()));
+ m_outgoingPackets.append(make_shared<DamageTileGroupPacket>(std::move(toDing), layer, sourcePosition, dingDamage, Maybe<EntityId>()));
res = TileDamageResult::Protected;
}
if (toDamage.size()) {
- m_outgoingPackets.append(make_shared<DamageTileGroupPacket>(move(toDamage), layer, sourcePosition, tileDamage, sourceEntity));
+ m_outgoingPackets.append(make_shared<DamageTileGroupPacket>(std::move(toDamage), layer, sourcePosition, tileDamage, sourceEntity));
res = TileDamageResult::Normal;
}
@@ -1405,7 +1405,7 @@ void WorldClient::collectLiquid(List<Vec2I> const& tilePositions, LiquidId liqui
void WorldClient::waitForLighting(Image* out) {
MutexLocker lock(m_lightMapMutex);
if (out)
- *out = move(m_lightMap);
+ *out = std::move(m_lightMap);
}
WorldClient::BroadcastCallback& WorldClient::broadcastCallback() {
@@ -1447,19 +1447,19 @@ void WorldClient::queueUpdatePackets() {
if (auto version = m_masterEntitiesNetVersion.ptr(entity->entityId())) {
auto updateAndVersion = entity->writeNetState(*version);
if (!updateAndVersion.first.empty())
- entityUpdateSet->deltas[entity->entityId()] = move(updateAndVersion.first);
+ entityUpdateSet->deltas[entity->entityId()] = std::move(updateAndVersion.first);
*version = updateAndVersion.second;
}
});
- m_outgoingPackets.append(move(entityUpdateSet));
+ m_outgoingPackets.append(std::move(entityUpdateSet));
}
for (auto& remoteHitRequest : m_damageManager->pullRemoteHitRequests())
- m_outgoingPackets.append(make_shared<HitRequestPacket>(move(remoteHitRequest)));
+ m_outgoingPackets.append(make_shared<HitRequestPacket>(std::move(remoteHitRequest)));
for (auto& remoteDamageRequest : m_damageManager->pullRemoteDamageRequests())
- m_outgoingPackets.append(make_shared<DamageRequestPacket>(move(remoteDamageRequest)));
+ m_outgoingPackets.append(make_shared<DamageRequestPacket>(std::move(remoteDamageRequest)));
for (auto& remoteDamageNotification : m_damageManager->pullRemoteDamageNotifications())
- m_outgoingPackets.append(make_shared<DamageNotificationPacket>(move(remoteDamageNotification)));
+ m_outgoingPackets.append(make_shared<DamageNotificationPacket>(std::move(remoteDamageNotification)));
}
void WorldClient::handleDamageNotifications() {
@@ -1642,7 +1642,7 @@ void WorldClient::lightingTileGather() {
if (tile.backgroundLightTransparent && pos[1] + y > undergroundLevel)
light += environmentLight;
}
- m_lightingCalculator.setCellIndex(baseIndex + y, move(light), !tile.foregroundLightTransparent);
+ m_lightingCalculator.setCellIndex(baseIndex + y, std::move(light), !tile.foregroundLightTransparent);
}
});
}
@@ -1811,7 +1811,7 @@ void WorldClient::notifyEntityCreate(EntityPtr const& entity) {
auto firstNetState = entity->writeNetState();
m_masterEntitiesNetVersion[entity->entityId()] = firstNetState.second;
m_outgoingPackets.append(make_shared<EntityCreatePacket>(entity->entityType(),
- Root::singleton().entityFactory()->netStoreEntity(entity), move(firstNetState.first), entity->entityId()));
+ Root::singleton().entityFactory()->netStoreEntity(entity), std::move(firstNetState.first), entity->entityId()));
}
}
@@ -1839,7 +1839,7 @@ WeatherNoisesDescriptionPtr WorldClient::currentWeatherNoises() const {
if (trackOptions.empty())
return {};
else
- return make_shared<WeatherNoisesDescription>(move(trackOptions));
+ return make_shared<WeatherNoisesDescription>(std::move(trackOptions));
}
AmbientNoisesDescriptionPtr WorldClient::currentMusicTrack() const {
@@ -1984,7 +1984,7 @@ void WorldClient::freshenCollision(RectI const& region) {
for (auto& collisionBlock : m_collisionGenerator.getBlocks(freshenRegion)) {
if (auto tile = m_tileArray->modifyTile(collisionBlock.space))
- tile->collisionCache.append(move(collisionBlock));
+ tile->collisionCache.append(std::move(collisionBlock));
}
}
}
@@ -2109,7 +2109,7 @@ bool WorldClient::sendSecretBroadcast(StringView broadcast, bool raw, bool compr
if (!compress)
damageNotification->setCompressionMode(PacketCompressionMode::Disabled);
- m_outgoingPackets.emplace_back(move(damageNotification));
+ m_outgoingPackets.emplace_back(std::move(damageNotification));
return true;
}
@@ -2122,27 +2122,27 @@ bool WorldClient::handleSecretBroadcast(PlayerPtr player, StringView broadcast)
void WorldClient::ClientRenderCallback::addDrawable(Drawable drawable, EntityRenderLayer renderLayer) {
- drawables[renderLayer].append(move(drawable));
+ drawables[renderLayer].append(std::move(drawable));
}
void WorldClient::ClientRenderCallback::addLightSource(LightSource lightSource) {
- lightSources.append(move(lightSource));
+ lightSources.append(std::move(lightSource));
}
void WorldClient::ClientRenderCallback::addParticle(Particle particle) {
- particles.append(move(particle));
+ particles.append(std::move(particle));
}
void WorldClient::ClientRenderCallback::addAudio(AudioInstancePtr audio) {
- audios.append(move(audio));
+ audios.append(std::move(audio));
}
void WorldClient::ClientRenderCallback::addTilePreview(PreviewTile preview) {
- previewTiles.append(move(preview));
+ previewTiles.append(std::move(preview));
}
void WorldClient::ClientRenderCallback::addOverheadBar(OverheadBar bar) {
- overheadBars.append(move(bar));
+ overheadBars.append(std::move(bar));
}
double WorldClient::epochTime() const {
diff --git a/source/game/StarWorldClientState.cpp b/source/game/StarWorldClientState.cpp
index 978c115..5dc6b12 100644
--- a/source/game/StarWorldClientState.cpp
+++ b/source/game/StarWorldClientState.cpp
@@ -52,7 +52,7 @@ List<EntityId> const& WorldClientState::clientPresenceEntities() const {
}
void WorldClientState::setClientPresenceEntities(List<EntityId> entities) {
- m_clientPresenceEntities.set(move(entities));
+ m_clientPresenceEntities.set(std::move(entities));
}
List<RectI> WorldClientState::monitoringRegions(function<Maybe<RectI>(EntityId)> entityBounds) const {
@@ -84,7 +84,7 @@ ByteArray WorldClientState::writeDelta() {
}
void WorldClientState::readDelta(ByteArray delta) {
- m_netGroup.readNetState(move(delta));
+ m_netGroup.readNetState(std::move(delta));
}
void WorldClientState::reset() {
diff --git a/source/game/StarWorldGeneration.cpp b/source/game/StarWorldGeneration.cpp
index 301df08..55a3b46 100644
--- a/source/game/StarWorldGeneration.cpp
+++ b/source/game/StarWorldGeneration.cpp
@@ -702,7 +702,7 @@ bool WorldGenerator::entityPersistent(WorldStorage*, EntityPtr const& entity) co
RpcPromise<Vec2I> WorldGenerator::enqueuePlacement(List<BiomeItemDistribution> distributions, Maybe<DungeonId> id) {
auto promise = RpcPromise<Vec2I>::createPair();
m_queuedPlacements.append(QueuedPlacement {
- move(distributions),
+ std::move(distributions),
id,
promise.second,
false,
@@ -829,7 +829,7 @@ void WorldGenerator::generateMicroDungeons(WorldStorage* worldStorage, ServerTil
m_worldServer->worldTemplate()->addPotentialBiomeItems(x, y, queuedItems, p.distributions, BiomePlacementArea::Surface);
m_worldServer->worldTemplate()->addPotentialBiomeItems(x, y, queuedItems, p.distributions, BiomePlacementArea::Underground);
for (auto placement : m_worldServer->worldTemplate()->validBiomeItems(x, y, queuedItems))
- placementQueue.append({move(placement), &p});
+ placementQueue.append({std::move(placement), &p});
}
}
}
diff --git a/source/game/StarWorldParameters.cpp b/source/game/StarWorldParameters.cpp
index d0fc646..97f0611 100644
--- a/source/game/StarWorldParameters.cpp
+++ b/source/game/StarWorldParameters.cpp
@@ -471,7 +471,7 @@ VisitableWorldParametersPtr netLoadVisitableWorldParameters(ByteArray data) {
if (data.empty())
return {};
- DataStreamBuffer ds(move(data));
+ DataStreamBuffer ds(std::move(data));
auto type = ds.read<WorldParametersType>();
VisitableWorldParametersPtr parameters;
diff --git a/source/game/StarWorldServer.cpp b/source/game/StarWorldServer.cpp
index a722b5a..f8acc18 100644
--- a/source/game/StarWorldServer.cpp
+++ b/source/game/StarWorldServer.cpp
@@ -82,7 +82,7 @@ WorldServer::~WorldServer() {
}
void WorldServer::setWorldId(String worldId) {
- m_worldId = move(worldId);
+ m_worldId = std::move(worldId);
}
String const& WorldServer::worldId() const {
@@ -90,7 +90,7 @@ String const& WorldServer::worldId() const {
}
void WorldServer::setUniverseSettings(UniverseSettingsPtr universeSettings) {
- m_universeSettings = move(universeSettings);
+ m_universeSettings = std::move(universeSettings);
}
UniverseSettingsPtr WorldServer::universeSettings() const {
@@ -117,7 +117,7 @@ void WorldServer::initLua(UniverseServer* universe) {
WorldStructure WorldServer::setCentralStructure(WorldStructure centralStructure) {
removeCentralStructure();
- m_centralStructure = move(centralStructure);
+ m_centralStructure = std::move(centralStructure);
m_centralStructure.setAnchorPosition(Vec2I(m_geometry.size()) / 2);
m_playerStart = Vec2F(m_centralStructure.flaggedBlocks("playerSpawn").first()) + Vec2F(0, 1);
@@ -286,7 +286,7 @@ List<PacketPtr> WorldServer::removeClient(ConnectionId clientId) {
}
}
- auto packets = move(info->outgoingPackets);
+ auto packets = std::move(info->outgoingPackets);
m_clientInfo.remove(clientId);
packets.append(make_shared<WorldStopPacket>("Removed"));
@@ -367,9 +367,9 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c
clientInfo->outgoingPackets.append(make_shared<GiveItemPacket>(item));
} else if (auto sepacket = as<SpawnEntityPacket>(packet)) {
- auto entity = entityFactory->netLoadEntity(sepacket->entityType, move(sepacket->storeData));
- entity->readNetState(move(sepacket->firstNetState));
- addEntity(move(entity));
+ auto entity = entityFactory->netLoadEntity(sepacket->entityType, std::move(sepacket->storeData));
+ entity->readNetState(std::move(sepacket->firstNetState));
+ addEntity(std::move(entity));
} else if (auto rdpacket = as<RequestDropPacket>(packet)) {
auto drop = m_entityMap->get<ItemDrop>(rdpacket->dropEntityId);
@@ -489,7 +489,7 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c
} else if (auto const& clientInfo = m_clientInfo.value(connectionForEntity(entity->entityId()))) {
m_entityMessageResponses[entityMessagePacket->uuid] = {clientInfo->clientId, clientId};
entityMessagePacket->fromConnection = clientId;
- clientInfo->outgoingPackets.append(move(entityMessagePacket));
+ clientInfo->outgoingPackets.append(std::move(entityMessagePacket));
}
}
@@ -500,7 +500,7 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c
auto response = m_entityMessageResponses.take(entityMessageResponsePacket->uuid).second;
if (response.is<ConnectionId>()) {
if (auto clientInfo = m_clientInfo.value(response.get<ConnectionId>()))
- clientInfo->outgoingPackets.append(move(entityMessageResponsePacket));
+ clientInfo->outgoingPackets.append(std::move(entityMessageResponsePacket));
} else {
if (entityMessageResponsePacket->response.isRight())
response.get<RpcPromiseKeeper<Json>>().fulfill(entityMessageResponsePacket->response.right());
@@ -529,7 +529,7 @@ void WorldServer::handleIncomingPackets(ConnectionId clientId, List<PacketPtr> c
List<PacketPtr> WorldServer::getOutgoingPackets(ConnectionId clientId) {
auto const& clientInfo = m_clientInfo.get(clientId);
- return move(clientInfo->outgoingPackets);
+ return std::move(clientInfo->outgoingPackets);
}
Maybe<Json> WorldServer::receiveMessage(ConnectionId fromConnection, String const& message, JsonArray const& args) {
@@ -624,7 +624,7 @@ void WorldServer::update(float dt) {
m_weather.setClientVisibleRegions(clientWindows);
m_weather.update(dt);
for (auto projectile : m_weather.pullNewProjectiles())
- addEntity(move(projectile));
+ addEntity(std::move(projectile));
if (shouldRunThisStep("liquidUpdate")) {
m_liquidEngine->setProcessingLimit(m_fidelityConfig.optUInt("liquidEngineBackgroundProcessingLimit"));
@@ -1563,14 +1563,14 @@ void WorldServer::updateTileEntityTiles(TileEntityPtr const& entity, bool removi
if (updated)
queueTileUpdates(pos);
}
- spaces.materials = move(passedSpaces);
+ spaces.materials = std::move(passedSpaces);
// add new roots and update known roots entry
for (auto const& rootPos : newRoots) {
if (auto tile = m_tileArray->modifyTile(rootPos + entity->tilePosition()))
tile->rootSource = entity->tilePosition();
}
- spaces.roots = move(newRoots);
+ spaces.roots = std::move(newRoots);
}
// check whether we've broken any other nearby entities
@@ -1622,7 +1622,7 @@ WorldServer::ScriptComponentPtr WorldServer::scriptContext(String const& context
}
RpcPromise<Vec2I> WorldServer::enqueuePlacement(List<BiomeItemDistribution> distributions, Maybe<DungeonId> id) {
- return m_worldStorage->enqueuePlacement(move(distributions), id);
+ return m_worldStorage->enqueuePlacement(std::move(distributions), id);
}
ServerTile const& WorldServer::getServerTile(Vec2I const& position, bool withSignal) {
@@ -1774,7 +1774,7 @@ void WorldServer::queueUpdatePackets(ConnectionId clientId) {
tie(weatherDelta, clientInfo->weatherNetVersion) = m_weather.writeUpdate(clientInfo->weatherNetVersion);
if (!skyDelta.empty() || !weatherDelta.empty())
- clientInfo->outgoingPackets.append(make_shared<EnvironmentUpdatePacket>(move(skyDelta), move(weatherDelta)));
+ clientInfo->outgoingPackets.append(make_shared<EnvironmentUpdatePacket>(std::move(skyDelta), std::move(weatherDelta)));
}
for (auto sector : clientInfo->pendingSectors.values()) {
@@ -1861,13 +1861,13 @@ void WorldServer::queueUpdatePackets(ConnectionId clientId) {
auto firstUpdate = monitoredEntity->writeNetState();
clientInfo->clientSlavesNetVersion.add(entityId, firstUpdate.second);
clientInfo->outgoingPackets.append(make_shared<EntityCreatePacket>(monitoredEntity->entityType(),
- entityFactory->netStoreEntity(monitoredEntity), move(firstUpdate.first), entityId));
+ entityFactory->netStoreEntity(monitoredEntity), std::move(firstUpdate.first), entityId));
}
}
}
for (auto& p : updateSetPackets)
- clientInfo->outgoingPackets.append(move(p.second));
+ clientInfo->outgoingPackets.append(std::move(p.second));
}
void WorldServer::updateDamage(float dt) {
@@ -2035,7 +2035,7 @@ void WorldServer::freshenCollision(RectI const& region) {
for (auto collisionBlock : m_collisionGenerator.getBlocks(freshenRegion)) {
if (auto tile = m_tileArray->modifyTile(collisionBlock.space))
- tile->collisionCache.append(move(collisionBlock));
+ tile->collisionCache.append(std::move(collisionBlock));
}
}
}
@@ -2055,7 +2055,7 @@ void WorldServer::removeEntity(EntityId entityId, bool andDie) {
auto& clientInfo = pair.second;
if (auto version = clientInfo->clientSlavesNetVersion.maybeTake(entity->entityId())) {
ByteArray finalDelta = entity->writeNetState(*version).first;
- clientInfo->outgoingPackets.append(make_shared<EntityDestroyPacket>(entity->entityId(), move(finalDelta), andDie));
+ clientInfo->outgoingPackets.append(make_shared<EntityDestroyPacket>(entity->entityId(), std::move(finalDelta), andDie));
}
}
diff --git a/source/game/StarWorldServerThread.cpp b/source/game/StarWorldServerThread.cpp
index 35d6225..c03c938 100644
--- a/source/game/StarWorldServerThread.cpp
+++ b/source/game/StarWorldServerThread.cpp
@@ -10,8 +10,8 @@ namespace Star {
WorldServerThread::WorldServerThread(WorldServerPtr server, WorldId worldId)
: Thread("WorldServerThread: " + printWorldId(worldId)),
- m_worldServer(move(server)),
- m_worldId(move(worldId)),
+ m_worldServer(std::move(server)),
+ m_worldId(std::move(worldId)),
m_stop(false),
m_errorOccurred(false),
m_shouldExpire(true) {
@@ -93,7 +93,7 @@ List<PacketPtr> WorldServerThread::removeClient(ConnectionId clientId) {
try {
auto incomingPackets = take(m_incomingPacketQueue[clientId]);
if (m_worldServer->hasClient(clientId))
- m_worldServer->handleIncomingPackets(clientId, move(incomingPackets));
+ m_worldServer->handleIncomingPackets(clientId, std::move(incomingPackets));
outgoingPackets = take(m_outgoingPacketQueue[clientId]);
if (m_worldServer->hasClient(clientId))
@@ -134,7 +134,7 @@ List<ConnectionId> WorldServerThread::erroredClients() const {
void WorldServerThread::pushIncomingPackets(ConnectionId clientId, List<PacketPtr> packets) {
RecursiveMutexLocker queueLocker(m_queueMutex);
- m_incomingPacketQueue[clientId].appendAll(move(packets));
+ m_incomingPacketQueue[clientId].appendAll(std::move(packets));
}
List<PacketPtr> WorldServerThread::pullOutgoingPackets(ConnectionId clientId) {
@@ -178,7 +178,7 @@ void WorldServerThread::setUpdateAction(WorldServerAction updateAction) {
void WorldServerThread::passMessages(List<Message>&& messages) {
RecursiveMutexLocker locker(m_messageMutex);
- m_messages.appendAll(move(messages));
+ m_messages.appendAll(std::move(messages));
}
WorldChunks WorldServerThread::readChunks() {
@@ -257,7 +257,7 @@ void WorldServerThread::update(WorldServerFidelity fidelity) {
auto incomingPackets = take(m_incomingPacketQueue[clientId]);
queueLocker.unlock();
try {
- m_worldServer->handleIncomingPackets(clientId, move(incomingPackets));
+ m_worldServer->handleIncomingPackets(clientId, std::move(incomingPackets));
} catch (std::exception const& e) {
Logger::error("WorldServerThread exception caught handling incoming packets for client {}: {}",
clientId, outputException(e, true));
@@ -275,7 +275,7 @@ void WorldServerThread::update(WorldServerFidelity fidelity) {
List<Message> messages;
{
RecursiveMutexLocker locker(m_messageMutex);
- messages = move(m_messages);
+ messages = std::move(m_messages);
}
for (auto& message : messages) {
if (auto resp = m_worldServer->receiveMessage(ServerConnectionId, message.message, message.args))
@@ -287,7 +287,7 @@ void WorldServerThread::update(WorldServerFidelity fidelity) {
for (auto& clientId : unerroredClientIds) {
auto outgoingPackets = m_worldServer->getOutgoingPackets(clientId);
RecursiveMutexLocker queueLocker(m_queueMutex);
- m_outgoingPacketQueue[clientId].appendAll(move(outgoingPackets));
+ m_outgoingPacketQueue[clientId].appendAll(std::move(outgoingPackets));
}
m_shouldExpire = m_worldServer->shouldExpire();
diff --git a/source/game/StarWorldStorage.cpp b/source/game/StarWorldStorage.cpp
index 869a830..08cf55c 100644
--- a/source/game/StarWorldStorage.cpp
+++ b/source/game/StarWorldStorage.cpp
@@ -45,7 +45,7 @@ WorldChunks WorldStorage::getWorldChunksFromFile(String const& file) {
openDatabase(db, File::open(file, IOMode::Read));
WorldChunks chunks;
- db.forAll([&chunks](ByteArray key, ByteArray value) { chunks.add(move(key), move(value)); });
+ db.forAll([&chunks](ByteArray key, ByteArray value) { chunks.add(std::move(key), std::move(value)); });
return chunks;
}
@@ -203,7 +203,7 @@ void WorldStorage::triggerTerraformSector(Sector sector) {
}
RpcPromise<Vec2I> WorldStorage::enqueuePlacement(List<BiomeItemDistribution> distributions, Maybe<DungeonId> id) {
- return m_generatorFacade->enqueuePlacement(move(distributions), id);
+ return m_generatorFacade->enqueuePlacement(std::move(distributions), id);
}
Maybe<float> WorldStorage::sectorTimeToLive(Sector sector) const {
@@ -405,7 +405,7 @@ WorldChunks WorldStorage::readChunks() {
WorldChunks chunks;
m_db.forAll([&chunks](ByteArray k, ByteArray v) {
- chunks.add(move(k), move(v));
+ chunks.add(std::move(k), std::move(v));
});
return WorldChunks(chunks);
@@ -578,7 +578,7 @@ ByteArray WorldStorage::writeSectorUniqueStore(SectorUniqueStore const& store) {
void WorldStorage::openDatabase(BTreeDatabase& db, IODevicePtr device) {
db.setContentIdentifier("World4");
db.setKeySize(5);
- db.setIODevice(move(device));
+ db.setIODevice(std::move(device));
db.setBlockSize(2048);
db.setAutoCommit(false);
db.open();
@@ -740,9 +740,9 @@ void WorldStorage::unloadSectorToLevel(Sector const& sector, SectorLoadLevel tar
return;
if (m_generatorFacade->entityPersistent(this, entity))
- entitiesToStore.append(move(entity));
+ entitiesToStore.append(std::move(entity));
else
- entitiesToRemove.append(move(entity));
+ entitiesToRemove.append(std::move(entity));
}
for (auto const& entity : entitiesToRemove) {
diff --git a/source/game/StarWorldStructure.cpp b/source/game/StarWorldStructure.cpp
index 110d28b..26ad976 100644
--- a/source/game/StarWorldStructure.cpp
+++ b/source/game/StarWorldStructure.cpp
@@ -74,7 +74,7 @@ WorldStructure::WorldStructure(String const& configPath) {
blockKeyConfig.getObject("objectParameters", JsonObject()),
blockKeyConfig.getBool("objectResidual", false),
jsonToStringList(blockKeyConfig.get("flags", JsonArray()))};
- blockKeys[jsonToColor(blockKeyConfig.get("value")).toRgba()] = move(blockKey);
+ blockKeys[jsonToColor(blockKeyConfig.get("value")).toRgba()] = std::move(blockKey);
}
Maybe<Vec2I> anchorPosition;
diff --git a/source/game/StarWorldTemplate.cpp b/source/game/StarWorldTemplate.cpp
index 38d17de..2755b1f 100644
--- a/source/game/StarWorldTemplate.cpp
+++ b/source/game/StarWorldTemplate.cpp
@@ -538,19 +538,19 @@ List<BiomeItemPlacement> WorldTemplate::validBiomeItems(int x, int y, PotentialB
auto blockBelow = getBlockInfo(x, y - 1);
if (!blockBelow.biomeTransition && blockBelow.terrain && !block.terrain && !blockBelow.foregroundCave)
- biomeItems.appendAll(move(potentialBiomeItems.surfaceBiomeItems));
+ biomeItems.appendAll(std::move(potentialBiomeItems.surfaceBiomeItems));
if (!blockBelow.biomeTransition && blockBelow.terrain && block.terrain && !blockBelow.foregroundCave && block.foregroundCave)
- biomeItems.appendAll(move(potentialBiomeItems.caveSurfaceBiomeItems));
+ biomeItems.appendAll(std::move(potentialBiomeItems.caveSurfaceBiomeItems));
if (!blockAbove.biomeTransition && blockAbove.terrain && block.terrain && !blockAbove.foregroundCave && block.foregroundCave)
- biomeItems.appendAll(move(potentialBiomeItems.caveCeilingBiomeItems));
+ biomeItems.appendAll(std::move(potentialBiomeItems.caveCeilingBiomeItems));
if (block.terrain && block.foregroundCave && !block.backgroundCave)
- biomeItems.appendAll(move(potentialBiomeItems.caveBackgroundBiomeItems));
+ biomeItems.appendAll(std::move(potentialBiomeItems.caveBackgroundBiomeItems));
if (block.oceanLiquid != EmptyLiquidId && y == block.oceanLiquidLevel)
- biomeItems.appendAll(move(potentialBiomeItems.oceanItems));
+ biomeItems.appendAll(std::move(potentialBiomeItems.oceanItems));
return biomeItems;
}
diff --git a/source/game/interfaces/StarWorld.cpp b/source/game/interfaces/StarWorld.cpp
index 5f416df..3c3afae 100644
--- a/source/game/interfaces/StarWorld.cpp
+++ b/source/game/interfaces/StarWorld.cpp
@@ -33,7 +33,7 @@ List<TileEntityPtr> World::entitiesAtTile(Vec2I const& pos, EntityFilter selecto
List<TileEntityPtr> list;
forEachEntityAtTile(pos, [&](TileEntityPtr entity) {
if (!selector || selector(entity))
- list.append(move(entity));
+ list.append(std::move(entity));
});
return list;
}
diff --git a/source/game/interfaces/StarWorld.hpp b/source/game/interfaces/StarWorld.hpp
index 9c97be5..e1986fa 100644
--- a/source/game/interfaces/StarWorld.hpp
+++ b/source/game/interfaces/StarWorld.hpp
@@ -216,7 +216,7 @@ List<shared_ptr<EntityT>> World::query(RectF const& boundBox, EntityFilterOf<Ent
forEachEntity(boundBox, [&](EntityPtr const& entity) {
if (auto e = as<EntityT>(entity)) {
if (!selector || selector(e))
- list.append(move(e));
+ list.append(std::move(e));
}
});
@@ -239,9 +239,9 @@ List<shared_ptr<EntityT>> World::lineQuery(
Vec2F const& begin, Vec2F const& end, EntityFilterOf<EntityT> selector) const {
List<shared_ptr<EntityT>> list;
forEachEntityLine(begin, end, [&](EntityPtr entity) {
- if (auto e = as<EntityT>(move(entity))) {
+ if (auto e = as<EntityT>(std::move(entity))) {
if (!selector || selector(e))
- list.append(move(e));
+ list.append(std::move(e));
}
});
@@ -253,7 +253,7 @@ List<shared_ptr<EntityT>> World::atTile(Vec2I const& pos) const {
List<shared_ptr<EntityT>> list;
forEachEntityAtTile(pos, [&](TileEntityPtr const& entity) {
if (auto e = as<EntityT>(entity))
- list.append(move(e));
+ list.append(std::move(e));
});
return list;
}
diff --git a/source/game/items/StarActiveItem.cpp b/source/game/items/StarActiveItem.cpp
index 49e82be..102ad16 100644
--- a/source/game/items/StarActiveItem.cpp
+++ b/source/game/items/StarActiveItem.cpp
@@ -182,7 +182,7 @@ List<DamageSource> ActiveItem::damageSources() const {
line.flipHorizontal(0.0f);
line.translate(handPosition(Vec2F()));
}
- damageSources.append(move(ds));
+ damageSources.append(std::move(ds));
}
return damageSources;
}
@@ -194,7 +194,7 @@ List<PolyF> ActiveItem::shieldPolys() const {
if (owner()->facingDirection() == Direction::Left)
sp.flipHorizontal(0.0f);
sp.translate(handPosition(Vec2F()));
- shieldPolys.append(move(sp));
+ shieldPolys.append(std::move(sp));
}
return shieldPolys;
}
@@ -213,7 +213,7 @@ List<PhysicsForceRegion> ActiveItem::forceRegions() const {
rfr->center[0] *= -1;
rfr->center += owner()->position() + handPosition(Vec2F());
}
- forceRegions.append(move(fr));
+ forceRegions.append(std::move(fr));
}
return forceRegions;
}
@@ -276,7 +276,7 @@ List<LightSource> ActiveItem::lights() const {
else
light.beamAngle = -Constants::pi / 2 - constrainAngle(light.beamAngle + Constants::pi / 2);
}
- result.append(move(light));
+ result.append(std::move(light));
}
result.appendAll(m_scriptedAnimator.lightSources());
return result;
@@ -294,7 +294,7 @@ List<AudioInstancePtr> ActiveItem::pullNewAudios() {
for (auto& audio : m_itemAnimatorDynamicTarget.pullNewAudios()) {
m_activeAudio[audio] = *audio->position();
audio->setPosition(owner()->position() + handPosition(*audio->position()));
- result.append(move(audio));
+ result.append(std::move(audio));
}
result.appendAll(m_scriptedAnimator.pullNewAudios());
return result;
@@ -310,7 +310,7 @@ List<Particle> ActiveItem::pullNewParticles() {
particle.velocity[0] *= -1;
particle.flip = !particle.flip;
}
- result.append(move(particle));
+ result.append(std::move(particle));
}
result.appendAll(m_scriptedAnimator.pullNewParticles());
return result;
@@ -462,20 +462,20 @@ LuaCallbacks ActiveItem::makeActiveItemCallbacks() {
});
callbacks.registerCallback("setCursor", [this](Maybe<String> cursor) {
- m_cursor = move(cursor);
+ m_cursor = std::move(cursor);
});
callbacks.registerCallback("setScriptedAnimationParameter", [this](String name, Json value) {
- m_scriptedAnimationParameters.set(move(name), move(value));
+ m_scriptedAnimationParameters.set(std::move(name), std::move(value));
});
callbacks.registerCallback("setInventoryIcon", [this](String image) {
setInstanceValue("inventoryIcon", image);
- setIconDrawables({Drawable::makeImage(move(image), 1.0f, true, Vec2F())});
+ setIconDrawables({Drawable::makeImage(std::move(image), 1.0f, true, Vec2F())});
});
callbacks.registerCallback("setInstanceValue", [this](String name, Json val) {
- setInstanceValue(move(name), move(val));
+ setInstanceValue(std::move(name), std::move(val));
});
callbacks.registerCallback("callOtherHandScript", [this](String const& func, LuaVariadic<LuaValue> const& args) {
diff --git a/source/game/items/StarArmors.cpp b/source/game/items/StarArmors.cpp
index 0f8ceb4..85580d9 100644
--- a/source/game/items/StarArmors.cpp
+++ b/source/game/items/StarArmors.cpp
@@ -74,7 +74,7 @@ void ArmorItem::refreshIconDrawables() {
drawable.imagePart().addDirectives(m_directives, true);
}
}
- setIconDrawables(move(drawables));
+ setIconDrawables(std::move(drawables));
}
void ArmorItem::refreshStatusEffects() {
diff --git a/source/game/items/StarInspectionTool.cpp b/source/game/items/StarInspectionTool.cpp
index 4f9b2cf..a9b12c4 100644
--- a/source/game/items/StarInspectionTool.cpp
+++ b/source/game/items/StarInspectionTool.cpp
@@ -60,7 +60,7 @@ List<LightSource> InspectionTool::lightSources() const {
lightSource.pointBeam = m_beamWidth;
lightSource.beamAngle = angle;
lightSource.beamAmbience = m_ambientFactor;
- return {move(lightSource)};
+ return {std::move(lightSource)};
}
float InspectionTool::inspectionHighlightLevel(InspectableEntityPtr const& inspectable) const {
diff --git a/source/game/items/StarMaterialItem.cpp b/source/game/items/StarMaterialItem.cpp
index c6d2ce9..c533add 100644
--- a/source/game/items/StarMaterialItem.cpp
+++ b/source/game/items/StarMaterialItem.cpp
@@ -32,7 +32,7 @@ MaterialItem::MaterialItem(Json const& config, String const& directory, Json con
d.imagePart().addDirectives(image, false);
}
}
- setIconDrawables(move(drawables));
+ setIconDrawables(std::move(drawables));
}
setTwoHanded(config.getBool("twoHanded", true));
@@ -48,10 +48,10 @@ MaterialItem::MaterialItem(Json const& config, String const& directory, Json con
if (m_placeSounds.empty()) {
auto miningSound = materialDatabase->miningSound(m_material);
if (!miningSound.empty())
- m_placeSounds.append(move(miningSound));
+ m_placeSounds.append(std::move(miningSound));
auto stepSound = materialDatabase->footstepSound(m_material);
if (!stepSound.empty())
- m_placeSounds.append(move(stepSound));
+ m_placeSounds.append(std::move(stepSound));
else if (m_placeSounds.empty())
m_placeSounds.append(materialDatabase->defaultFootstepSound());
}
@@ -259,7 +259,7 @@ List<Drawable> const& MaterialItem::generatedPreview(Vec2I position) const {
drawable.translate(-boundBox.center());
}
- m_generatedPreviewCache.emplace(move(drawables));
+ m_generatedPreviewCache.emplace(std::move(drawables));
}
else
m_generatedPreviewCache.emplace(iconDrawables());
diff --git a/source/game/items/StarTools.cpp b/source/game/items/StarTools.cpp
index 7faaeae..e1bb576 100644
--- a/source/game/items/StarTools.cpp
+++ b/source/game/items/StarTools.cpp
@@ -245,7 +245,7 @@ List<LightSource> Flashlight::lightSources() const {
lightSource.pointBeam = m_beamWidth;
lightSource.beamAngle = angle;
lightSource.beamAmbience = m_ambientFactor;
- return {move(lightSource)};
+ return {std::move(lightSource)};
}
WireTool::WireTool(Json const& config, String const& directory, Json const& parameters)
diff --git a/source/game/objects/StarContainerObject.cpp b/source/game/objects/StarContainerObject.cpp
index f666902..8a3d0f4 100644
--- a/source/game/objects/StarContainerObject.cpp
+++ b/source/game/objects/StarContainerObject.cpp
@@ -119,7 +119,7 @@ void ContainerObject::render(RenderCallback* renderCallback) {
auto audio = make_shared<AudioInstance>(*assets->audio(Random::randValueFrom(configValue("openSounds").toArray()).toString()));
audio->setPosition(position());
audio->setRangeMultiplier(config()->soundEffectRangeMultiplier);
- renderCallback->addAudio(move(audio));
+ renderCallback->addAudio(std::move(audio));
}
}
if (m_currentState == configValue("openFrameIndex", 2).toInt()) {
@@ -128,7 +128,7 @@ void ContainerObject::render(RenderCallback* renderCallback) {
auto audio = make_shared<AudioInstance>(*assets->audio(Random::randValueFrom(configValue("closeSounds").toArray()).toString()));
audio->setPosition(position());
audio->setRangeMultiplier(config()->soundEffectRangeMultiplier);
- renderCallback->addAudio(move(audio));
+ renderCallback->addAudio(std::move(audio));
}
}
if (m_opened.get() < m_currentState) {
diff --git a/source/game/objects/StarLoungeableObject.cpp b/source/game/objects/StarLoungeableObject.cpp
index 7a3fbea..a84a6dc 100644
--- a/source/game/objects/StarLoungeableObject.cpp
+++ b/source/game/objects/StarLoungeableObject.cpp
@@ -19,7 +19,7 @@ void LoungeableObject::render(RenderCallback* renderCallback) {
Drawable::makeImage(m_sitCoverImage, 1.0f / TilePixels, false, position() + orientation->imagePosition);
if (m_flipImages)
drawable.scale(Vec2F(-1, 1), drawable.boundBox(false).center());
- renderCallback->addDrawable(move(drawable), RenderLayerObject + 2);
+ renderCallback->addDrawable(std::move(drawable), RenderLayerObject + 2);
}
}
}
diff --git a/source/game/objects/StarPhysicsObject.cpp b/source/game/objects/StarPhysicsObject.cpp
index f327473..9da604d 100644
--- a/source/game/objects/StarPhysicsObject.cpp
+++ b/source/game/objects/StarPhysicsObject.cpp
@@ -7,7 +7,7 @@
namespace Star {
-PhysicsObject::PhysicsObject(ObjectConfigConstPtr config, Json const& parameters) : Object(move(config), parameters) {
+PhysicsObject::PhysicsObject(ObjectConfigConstPtr config, Json const& parameters) : Object(std::move(config), parameters) {
for (auto const& p : configValue("physicsForces", JsonObject()).iterateObject()) {
auto& forceConfig = m_physicsForces[p.first];
@@ -60,7 +60,7 @@ void PhysicsObject::init(World* world, EntityId entityId, EntityMode mode) {
auto& collisionConfig = m_physicsCollisions.get(collision);
collisionConfig.enabled.set(enabled);
});
- m_scriptComponent.addCallbacks("physics", move(physicsCallbacks));
+ m_scriptComponent.addCallbacks("physics", std::move(physicsCallbacks));
}
Object::init(world, entityId, mode);
m_metaBoundBox = Object::metaBoundBox();
@@ -92,7 +92,7 @@ List<PhysicsForceRegion> PhysicsObject::forceRegions() const {
if (p.second.enabled.get()) {
PhysicsForceRegion forceRegion = p.second.forceRegion;
forceRegion.call([pos = position()](auto& fr) { fr.translate(pos); });
- forces.append(move(forceRegion));
+ forces.append(std::move(forceRegion));
}
}
return forces;
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) {