summaryrefslogtreecommitdiffstats
path: root/src/testlib/qbenchmark.cpp
diff options
context:
space:
mode:
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