AutoTest: performance-for-range-copy

Change-Id: I60e79aec1fe2813867d8ff46cec7d39b848d0020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
Alessandro Portale
2020-06-11 16:53:11 +02:00
parent 4766ad2d18
commit bb89b80097
6 changed files with 7 additions and 7 deletions

View File

@@ -373,10 +373,10 @@ int TestResultModel::resultTypeCount(ResultType type) const
{
int result = 0;
for (auto resultsForId : m_testResultCount.values())
for (const auto &resultsForId : m_testResultCount.values())
result += resultsForId.value(type, 0);
for (auto id : m_reportedSummary.keys()) {
for (const auto &id : m_reportedSummary.keys()) {
if (int counted = m_testResultCount.value(id).value(type))
result -= counted;
result += m_reportedSummary[id].value(type);