Use structured bindings (C++17 feature)

This commit is contained in:
Mat Sutcliffe
2021-04-17 16:31:39 +01:00
parent 9964f44d25
commit 22301c1a1f
6 changed files with 18 additions and 23 deletions

View File

@@ -1871,10 +1871,10 @@ namespace BlackCore
}
if (callStatistics.isEmpty()) { return QString(); }
for (const auto pair : makePairsRange(as_const(callStatistics)))
for (const auto [key, value] : makePairsRange(as_const(callStatistics)))
{
// key is pair.first, value is pair.second
transformed.push_back({ pair.second, pair.first });
transformed.push_back({ value, key });
}
// sorted by value