From 02e2682ee893d4915b90dc75b890d82b488a4d0a Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 27 Mar 2023 22:14:04 +0200 Subject: [PATCH] QFutureInterface::reportAndMoveResult(): don't spell a move as forward() 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 where U is a reference type). So std::forward 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 --- src/corelib/thread/qfutureinterface.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/thread/qfutureinterface.h b/src/corelib/thread/qfutureinterface.h index 418f19866d..7e682e69b6 100644 --- a/src/corelib/thread/qfutureinterface.h +++ b/src/corelib/thread/qfutureinterface.h @@ -311,7 +311,7 @@ bool QFutureInterface::reportAndMoveResult(T &&result, int index) QtPrivate::ResultStoreBase &store = resultStoreBase(); const int oldResultCount = store.count(); - const int insertIndex = store.moveResult(index, std::forward(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());