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