VNC-151 Refactor ScreenSet logic for modern C++

This commit is contained in:
El 2025-11-06 10:49:44 +00:00
parent 28d9c6a467
commit e30537250f
No known key found for this signature in database
GPG Key ID: 205388FEB607950A

View File

@ -106,12 +106,12 @@ namespace rfb {
fb_rect.setXYWH(0, 0, fb_width, fb_height);
for (auto &screen: screens) {
for (const auto &screen: screens) {
if (screen.dimensions.is_empty())
return false;
if (!screen.dimensions.enclosed_by(fb_rect))
return false;
if (seen_ids.find(screen.id) != seen_ids.end())
if (seen_ids.contains(screen.id))
return false;
seen_ids.insert(screen.id);
}