1
Fork 0
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:
Hendiadyoin1 2024-03-01 14:05:52 +01:00 committed by Andrew Kaster
parent 773a280bdf
commit d6c631ebe0
5 changed files with 29 additions and 32 deletions

View file

@ -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;
}
}