summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qfutureinterface.h
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@qt.io>2023-03-27 22:14:04 +0200
committerMarc Mutz <marc.mutz@qt.io>2023-03-31 20:27:54 +0000
commit02e2682ee893d4915b90dc75b890d82b488a4d0a (patch)
tree33dbaf091c91e8fac321ace155bea0612be9228e /src/corelib/thread/qfutureinterface.h
parent10e106ae47c5a9450623d9874fdfd0c0aee54f26 (diff)
QFutureInterface::reportAndMoveResult(): don't spell a move as forward<T>()
The T&& result argument is not deduced (T is the template class' template argument, so it's an rvalue reference, not a Universal Reference, assuming that we don't support QFutureInterface<U> where U is a reference type). So std::forward<T> will always be a std::move(), so use that directly instead of raising eyebrows in the reader of the code by using forward<> to feed a function called _move_Result(). Pick-to: 6.5 Change-Id: I805df4686b5b74da57f8212b052b4056943a15fa Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/corelib/thread/qfutureinterface.h')
-rw-r--r--src/corelib/thread/qfutureinterface.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h
index 418f19866da..7e682e69b68 100644
--- a/src/corelib/thread/qfutureinterface.h
+++ b/src/corelib/thread/qfutureinterface.h
@@ -311,7 +311,7 @@ bool QFutureInterface<T>::reportAndMoveResult(T &&result, int index)
QtPrivate::ResultStoreBase &store = resultStoreBase();
const int oldResultCount = store.count();
- const int insertIndex = store.moveResult(index, std::forward<T>(result));
+ const int insertIndex = store.moveResult(index, std::move(result));
// Let's make sure it's not in pending results.
if (insertIndex != -1 && (!store.filterMode() || oldResultCount < store.count()))
reportResultsReady(insertIndex, store.count());