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/StarSet.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/StarSet.hpp')
-rw-r--r-- | source/core/StarSet.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/core/StarSet.hpp b/source/core/StarSet.hpp index 8950e9c..f32a46c 100644 --- a/source/core/StarSet.hpp +++ b/source/core/StarSet.hpp @@ -129,7 +129,7 @@ bool SetMixin<BaseSet>::add(value_type const& v) { template <typename BaseSet> bool SetMixin<BaseSet>::replace(value_type v) { bool replaced = remove(v); - Base::insert(move(v)); + Base::insert(std::move(v)); return replaced; } @@ -170,7 +170,7 @@ auto SetMixin<BaseSet>::takeFirst() -> value_type { if (Base::empty()) throw SetException("takeFirst called on empty set"); auto i = Base::begin(); - value_type v = move(*i); + value_type v = std::move(*i); Base::erase(i); return v; } @@ -180,9 +180,9 @@ auto SetMixin<BaseSet>::maybeTakeFirst() -> Maybe<value_type> { if (Base::empty()) return {}; auto i = Base::begin(); - value_type v = move(*i); + value_type v = std::move(*i); Base::erase(i); - return move(v); + return std::move(v); } template <typename BaseSet> @@ -204,7 +204,7 @@ auto SetMixin<BaseSet>::takeLast() -> value_type { if (Base::empty()) throw SetException("takeLast called on empty set"); auto i = prev(Base::end()); - value_type v = move(*i); + value_type v = std::move(*i); Base::erase(i); return v; } @@ -214,9 +214,9 @@ auto SetMixin<BaseSet>::maybeTakeLast() -> Maybe<value_type> { if (Base::empty()) return {}; auto i = prev(Base::end()); - value_type v = move(*i); + value_type v = std::move(*i); Base::erase(i); - return move(v); + return std::move(v); } template <typename BaseSet> |