mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Use structured bindings (C++17 feature)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -178,10 +178,8 @@ namespace BlackCore
|
||||
}
|
||||
|
||||
QSet<QString> newActiveActions;
|
||||
for (const auto pair : makePairsRange(as_const(m_configuredActions)))
|
||||
for (const auto [combination, action] : makePairsRange(as_const(m_configuredActions)))
|
||||
{
|
||||
const CHotkeyCombination &combination = pair.first;
|
||||
const QString &action = pair.second;
|
||||
if (combination.isSubsetOf(currentCombination))
|
||||
{
|
||||
newActiveActions.insert(action);
|
||||
|
||||
Reference in New Issue
Block a user