Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/core/StarRpcThreadPromise.hpp
diff options
context:
space:
mode:
authorKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
committerKai Blaschke <kai.blaschke@kb-dev.net>2024-02-19 16:55:19 +0100
commit431a9c00a56cf4c603be1cf5f773b193621d8150 (patch)
tree95843aeea9fb6dc18279ee05ff6961f40b19798f /source/core/StarRpcThreadPromise.hpp
parent30e1871d3f44629e00a1f66d8164e3e62c7f889f (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/StarRpcThreadPromise.hpp')
-rw-r--r--source/core/StarRpcThreadPromise.hpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/core/StarRpcThreadPromise.hpp b/source/core/StarRpcThreadPromise.hpp
index bae509c..043d0e7 100644
--- a/source/core/StarRpcThreadPromise.hpp
+++ b/source/core/StarRpcThreadPromise.hpp
@@ -66,12 +66,12 @@ private:
template <typename Result, typename Error>
void RpcThreadPromiseKeeper<Result, Error>::fulfill(Result result) {
- m_fulfill(move(result));
+ m_fulfill(std::move(result));
}
template <typename Result, typename Error>
void RpcThreadPromiseKeeper<Result, Error>::fail(Error error) {
- m_fail(move(error));
+ m_fail(std::move(error));
}
template <typename Result, typename Error>
@@ -88,22 +88,22 @@ pair<RpcThreadPromise<Result, Error>, RpcThreadPromiseKeeper<Result, Error>> Rpc
MutexLocker lock(valuePtr->mutex);
if (valuePtr->result || valuePtr->error)
throw RpcThreadPromiseException("fulfill called on already finished RpcThreadPromise");
- valuePtr->result = move(result);
+ valuePtr->result = std::move(result);
};
keeper.m_fail = [valuePtr](Error error) {
MutexLocker lock(valuePtr->mutex);
if (valuePtr->result || valuePtr->error)
throw RpcThreadPromiseException("fail called on already finished RpcThreadPromise");
- valuePtr->error = move(error);
+ valuePtr->error = std::move(error);
};
- return {move(promise), move(keeper)};
+ return {std::move(promise), std::move(keeper)};
}
template <typename Result, typename Error>
RpcThreadPromise<Result, Error> RpcThreadPromise<Result, Error>::createFulfilled(Result result) {
auto valuePtr = make_shared<Value>();
- valuePtr->result = move(result);
+ valuePtr->result = std::move(result);
RpcThreadPromise<Result, Error> promise;
promise.m_getValue = [valuePtr]() {
@@ -115,7 +115,7 @@ RpcThreadPromise<Result, Error> RpcThreadPromise<Result, Error>::createFulfilled
template <typename Result, typename Error>
RpcThreadPromise<Result, Error> RpcThreadPromise<Result, Error>::createFailed(Error error) {
auto valuePtr = make_shared<Value>();
- valuePtr->error = move(error);
+ valuePtr->error = std::move(error);
RpcThreadPromise<Result, Error> promise;
promise.m_getValue = [valuePtr]() {