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/StarEither.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/StarEither.hpp')
-rw-r--r-- | source/core/StarEither.hpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/source/core/StarEither.hpp b/source/core/StarEither.hpp index 287e4bc..bed6fd7 100644 --- a/source/core/StarEither.hpp +++ b/source/core/StarEither.hpp @@ -85,12 +85,12 @@ private: template <typename Value> EitherLeftValue<Value> makeLeft(Value value) { - return {move(value)}; + return {std::move(value)}; } template <typename Value> EitherRightValue<Value> makeRight(Value value) { - return {move(value)}; + return {std::move(value)}; } template <typename Left, typename Right> @@ -98,21 +98,21 @@ Either<Left, Right>::Either() {} template <typename Left, typename Right> Either<Left, Right>::Either(EitherLeftValue<Left> left) - : m_value(move(left)) {} + : m_value(std::move(left)) {} template <typename Left, typename Right> Either<Left, Right>::Either(EitherRightValue<Right> right) - : m_value(move(right)) {} + : m_value(std::move(right)) {} template <typename Left, typename Right> template <typename T> Either<Left, Right>::Either(EitherLeftValue<T> left) - : Either(LeftType{move(left.value)}) {} + : Either(LeftType{std::move(left.value)}) {} template <typename Left, typename Right> template <typename T> Either<Left, Right>::Either(EitherRightValue<T> right) - : Either(RightType{move(right.value)}) {} + : Either(RightType{std::move(right.value)}) {} template <typename Left, typename Right> Either<Left, Right>::Either(Either const& rhs) @@ -120,7 +120,7 @@ Either<Left, Right>::Either(Either const& rhs) template <typename Left, typename Right> Either<Left, Right>::Either(Either&& rhs) - : m_value(move(rhs.m_value)) {} + : m_value(std::move(rhs.m_value)) {} template <typename Left, typename Right> Either<Left, Right>& Either<Left, Right>::operator=(Either const& rhs) { @@ -130,21 +130,21 @@ Either<Left, Right>& Either<Left, Right>::operator=(Either const& rhs) { template <typename Left, typename Right> Either<Left, Right>& Either<Left, Right>::operator=(Either&& rhs) { - m_value = move(rhs.m_value); + m_value = std::move(rhs.m_value); return *this; } template <typename Left, typename Right> template <typename T> Either<Left, Right>& Either<Left, Right>::operator=(EitherLeftValue<T> left) { - m_value = LeftType{move(left.value)}; + m_value = LeftType{std::move(left.value)}; return *this; } template <typename Left, typename Right> template <typename T> Either<Left, Right>& Either<Left, Right>::operator=(EitherRightValue<T> right) { - m_value = RightType{move(right.value)}; + m_value = RightType{std::move(right.value)}; return *this; } @@ -160,12 +160,12 @@ bool Either<Left, Right>::isRight() const { template <typename Left, typename Right> void Either<Left, Right>::setLeft(Left left) { - m_value = LeftType{move(left)}; + m_value = LeftType{std::move(left)}; } template <typename Left, typename Right> void Either<Left, Right>::setRight(Right right) { - m_value = RightType{move(right)}; + m_value = RightType{std::move(right)}; } template <typename Left, typename Right> |