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

summaryrefslogtreecommitdiff
path: root/source/game/StarWorldStorage.cpp
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
commit431a9c00a56cf4c603be1cf5f773b193621d8150 (patch)
tree95843aeea9fb6dc18279ee05ff6961f40b19798f /source/game/StarWorldStorage.cpp
parent30e1871d3f44629e00a1f66d8164e3e62c7f889f (diff)
Fixed a huge amount of Clang warnings
On Linux and macOS, using Clang to compile OpenStarbound produces about 400 MB worth of warnings during the build, making the compiler output unreadable and slowing the build down considerably. 99% of the warnings were unqualified uses of std::move and std::forward, which are now all properly qualified. Fixed a few other minor warnings about non-virtual destructors and some uses of std::move preventing copy elision on temporary objects. Most remaining warnings are now unused parameters.
Diffstat (limited to 'source/game/StarWorldStorage.cpp')
-rw-r--r--source/game/StarWorldStorage.cpp12
1 files changed, 6 insertions, 6 deletions
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) {