summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndrei Golubev <andrei.golubev@qt.io>2020-10-12 16:29:27 +0200
committerAndrei Golubev <andrei.golubev@qt.io>2020-10-22 20:47:10 +0200
commitbfc6e2d69d2514f7b4e889d08475972eb2f340a6 (patch)
tree0251582adcc3d5bf7be22213080e6065a09ec151 /tests
parent115ead8fe463606aafc82641425423337053af2b (diff)
Use parameter_type in QList methods
QList::parameter_type is defined and used to give better performance e.g. for arithmetic types. Let's use it consistently in QList API instead of const T & Change-Id: I2e12bd83f55679b55a14fbb23ab6172a9cf7bbcc Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp10
-rw-r--r--tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp4
2 files changed, 8 insertions, 6 deletions
diff --git a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
index 28e83fbee5..ac6869eee9 100644
--- a/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
+++ b/tests/auto/concurrent/qtconcurrentfilter/tst_qtconcurrentfilter.cpp
@@ -403,8 +403,9 @@ void tst_QtConcurrentFilter::filteredReduced()
const int intSum = 6; // sum of even values
const Number numberSum = 6; // sum of even values
- void (QList<int>::*pushBackInt)(const int &) = &QList<int>::push_back;
- void (QList<Number>::*pushBackNumber)(const Number &) = &QList<Number>::push_back;
+ void (QList<int>::*pushBackInt)(QList<int>::parameter_type) = &QList<int>::push_back;
+ void (QList<Number>::*pushBackNumber)(QList<Number>::parameter_type) =
+ &QList<Number>::push_back;
auto lambdaIsEven = [](const int &x) {
return (x & 1) == 0;
@@ -703,8 +704,9 @@ void tst_QtConcurrentFilter::filteredReducedInitialValue()
const int intSum = 16; // sum of even values and initial value
const Number numberSum = 16; // sum of even values and initial value
- void (QList<int>::*pushBackInt)(const int &) = &QList<int>::push_back;
- void (QList<Number>::*pushBackNumber)(const Number &) = &QList<Number>::push_back;
+ void (QList<int>::*pushBackInt)(QList<int>::parameter_type) = &QList<int>::push_back;
+ void (QList<Number>::*pushBackNumber)(QList<Number>::parameter_type) =
+ &QList<Number>::push_back;
auto lambdaIsEven = [](const int &x) {
return (x & 1) == 0;
diff --git a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
index 804f14e628..06446321b3 100644
--- a/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
+++ b/tests/auto/concurrent/qtconcurrentmap/tst_qtconcurrentmap.cpp
@@ -718,7 +718,7 @@ void tst_QtConcurrentMap::mappedReduced()
const int sum = 6;
const int sumOfSquares = 14;
- void (QList<int>::*push_back)(const int &) = &QList<int>::push_back;
+ void (QList<int>::*push_back)(QList<int>::parameter_type) = &QList<int>::push_back;
auto lambdaSquare = [](int x) {
return x * x;
@@ -1009,7 +1009,7 @@ void tst_QtConcurrentMap::mappedReducedInitialValue()
const int sumOfSquares = 24;
const int intInitial = 10;
- void (QList<int>::*push_back)(const int &) = &QList<int>::push_back;
+ void (QList<int>::*push_back)(QList<int>::parameter_type) = &QList<int>::push_back;
auto lambdaSquare = [](int x) {
return x * x;