summaryrefslogtreecommitdiffstats
path: root/src/testlib/qbenchmark.cpp
diff options
context:
space:
mode:
authorRiccardo Ieva <riccardo.ieva@qt.io>2025-09-26 10:43:00 +0200
committerRiccardo Ieva <riccardo.ieva@qt.io>2025-09-29 20:02:13 +0200
commitc6808338e071859a751edae71b099e48ddf33ec4 (patch)
treefcc77e20a7bae82a0d69853e1fc8a2dddf3c85d2 /src/testlib/qbenchmark.cpp
parent1e1e821edc08ead89e0cad66aed7790b7c58d9bf (diff)
Remove qAverage from QBenchmark.cpp
qAverage is not used anywhere and the addition of qVaryMeanAccumulator make it redundant. Remove it to clean up code. Change-Id: I101154849bc68a8037bd9d5caffc02dfff1af65f Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Diffstat (limited to 'src/testlib/qbenchmark.cpp')
-rw-r--r--src/testlib/qbenchmark.cpp15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp
index 11bb28b9d55..e78ca7b44ba 100644
--- a/src/testlib/qbenchmark.cpp
+++ b/src/testlib/qbenchmark.cpp
@@ -240,19 +240,4 @@ void QTest::setBenchmarkResult(qreal result, QTest::QBenchmarkMetric metric)
QBenchmarkTestMethodData::current->setResult({ result, metric }, false);
}
-template <typename T>
-typename T::value_type qAverage(const T &container)
-{
- typename T::const_iterator it = container.constBegin();
- typename T::const_iterator end = container.constEnd();
- typename T::value_type acc = typename T::value_type();
- int count = 0;
- while (it != end) {
- acc += *it;
- ++it;
- ++count;
- }
- return acc / count;
-}
-
QT_END_NAMESPACE