summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSona Kurazyan <sona.kurazyan@qt.io>2020-10-13 16:31:47 +0200
committerSona Kurazyan <sona.kurazyan@qt.io>2020-10-14 21:24:26 +0200
commit9ded4739140e7e30aa386a9800c26afdbf952fd3 (patch)
treeeff885ee8a316d283f00d215a20807cc794c84ff
parente1926e50606d11988ed99530ea073ffe15177137 (diff)
Minor cleanups based on API review
- Be more more consistent when declaring type aliases. - Re-group include directives Change-Id: Ic521e9f7692e538cc98871bdeccd9644c9879089 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
-rw-r--r--src/concurrent/qtconcurrentfunctionwrappers.h10
-rw-r--r--src/concurrent/qtconcurrentstoredfunctioncall.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/concurrent/qtconcurrentfunctionwrappers.h b/src/concurrent/qtconcurrentfunctionwrappers.h
index be95416759..c8aab34b87 100644
--- a/src/concurrent/qtconcurrentfunctionwrappers.h
+++ b/src/concurrent/qtconcurrentfunctionwrappers.h
@@ -108,19 +108,19 @@ struct ReduceResultType;
template <class U, class V>
struct ReduceResultType<void(*)(U&,V)>
{
- typedef U ResultType;
+ using ResultType = U;
};
template <class T, class C, class U>
struct ReduceResultType<T(C::*)(U)>
{
- typedef C ResultType;
+ using ResultType = C;
};
template <class U, class V>
struct ReduceResultType<std::function<void(U&, V)>>
{
- typedef U ResultType;
+ using ResultType = U;
};
template <typename R, typename ...A>
@@ -133,13 +133,13 @@ struct ReduceResultType<R(*)(A...)>
template <class U, class V>
struct ReduceResultType<void(*)(U&,V) noexcept>
{
- typedef U ResultType;
+ using ResultType = U;
};
template <class T, class C, class U>
struct ReduceResultType<T(C::*)(U) noexcept>
{
- typedef C ResultType;
+ using ResultType = C;
};
#endif
diff --git a/src/concurrent/qtconcurrentstoredfunctioncall.h b/src/concurrent/qtconcurrentstoredfunctioncall.h
index 44a93360d8..f7e9e03e21 100644
--- a/src/concurrent/qtconcurrentstoredfunctioncall.h
+++ b/src/concurrent/qtconcurrentstoredfunctioncall.h
@@ -44,10 +44,10 @@
#ifndef QT_NO_CONCURRENT
#include <QtConcurrent/qtconcurrentrunbase.h>
-#include <type_traits>
-
#include <QtCore/qpromise.h>
+#include <type_traits>
+
QT_BEGIN_NAMESPACE
#ifndef Q_QDOC