From 0eccfe5e390ca967f4c5cbc4093c9e50bbce9c33 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Wed, 22 Mar 2023 15:45:51 +0100 Subject: [PATCH] tst_bench_QCryptographicHash: port from std::function to qxp::function_ref Because we can, and because function_ref is never null. Pick-to: 6.5 Change-Id: If71f98860d72eaa8cf8a93bb3c59a0260d3c7660 Reviewed-by: Fabian Kosmale --- .../qcryptographichash/tst_bench_qcryptographichash.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp b/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp index 350474aa90d..2127298f59a 100644 --- a/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp +++ b/tests/benchmarks/corelib/tools/qcryptographichash/tst_bench_qcryptographichash.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -45,9 +45,8 @@ private Q_SLOTS: const int MaxBlockSize = 65536; -static void for_each_algorithm(std::function f) +static void for_each_algorithm(qxp::function_ref f) { - Q_ASSERT(f); using A = QCryptographicHash::Algorithm; static const auto metaEnum = QMetaEnum::fromType(); for (int i = 0, value = metaEnum.value(i); value != -1; value = metaEnum.value(++i))