diff options
author | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-19 16:55:19 +0100 |
---|---|---|
committer | Kai Blaschke <kai.blaschke@kb-dev.net> | 2024-02-19 16:55:19 +0100 |
commit | 431a9c00a56cf4c603be1cf5f773b193621d8150 (patch) | |
tree | 95843aeea9fb6dc18279ee05ff6961f40b19798f /source/game/StarSystemWorld.cpp | |
parent | 30e1871d3f44629e00a1f66d8164e3e62c7f889f (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/StarSystemWorld.cpp')
-rw-r--r-- | source/game/StarSystemWorld.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
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 { |