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/core/StarMap.hpp | |
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/core/StarMap.hpp')
-rw-r--r-- | source/core/StarMap.hpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/core/StarMap.hpp b/source/core/StarMap.hpp index cf9c260..e3f9d67 100644 --- a/source/core/StarMap.hpp +++ b/source/core/StarMap.hpp @@ -172,7 +172,7 @@ auto MapMixin<BaseMap>::maybeTake(key_type const& k) -> Maybe<mapped_type> { if (i != Base::end()) { mapped_type v = std::move(i->second); Base::erase(i); - return move(v); + return std::move(v); } return {}; @@ -260,12 +260,12 @@ auto MapMixin<BaseMap>::hasValue(mapped_type const& v) const -> bool { template <typename BaseMap> auto MapMixin<BaseMap>::insert(key_type k, mapped_type v) -> pair<iterator, bool> { - return Base::insert(value_type(move(k), move(v))); + return Base::insert(value_type(std::move(k), std::move(v))); } template <typename BaseMap> auto MapMixin<BaseMap>::add(key_type k, mapped_type v) -> mapped_type& { - auto pair = Base::insert(value_type(move(k), move(v))); + auto pair = Base::insert(value_type(std::move(k), std::move(v))); if (!pair.second) throw MapException(strf("Entry with key '{}' already present.", outputAny(k))); else @@ -276,10 +276,10 @@ template <typename BaseMap> auto MapMixin<BaseMap>::set(key_type k, mapped_type v) -> mapped_type& { auto i = Base::find(k); if (i != Base::end()) { - i->second = move(v); + i->second = std::move(v); return i->second; } else { - return Base::insert(value_type(move(k), move(v))).first->second; + return Base::insert(value_type(std::move(k), std::move(v))).first->second; } } |