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/StarUniverseClient.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/StarUniverseClient.cpp')
-rw-r--r-- | source/game/StarUniverseClient.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
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>()) { |