mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 16:57:34 +00:00
WindowServer: Prefer structured bindings when iterating over HashMaps
This commit is contained in:
parent
773a280bdf
commit
d6c631ebe0
5 changed files with 29 additions and 32 deletions
|
@ -583,8 +583,8 @@ void WindowManager::for_each_window_manager(Callback callback)
|
|||
auto& connections = WMConnectionFromClient::s_connections;
|
||||
|
||||
// FIXME: this isn't really ordered... does it need to be?
|
||||
for (auto it = connections.begin(); it != connections.end(); ++it) {
|
||||
if (callback(*it->value) == IterationDecision::Break)
|
||||
for (auto [_, connection] : connections) {
|
||||
if (callback(connection) == IterationDecision::Break)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue