WindowServer: Fix 'use of GNU old-style field designator'
Since C99 and C++20 have a standardized syntax for designated initializer, we should use that instead of this GCC-specific extension. While this currently works both in Clang and GCC, the former emits a warning for it, while the latter has an [issue] open that plans to deprecate it. [issue]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88144
This commit is contained in:
parent
db840aaacd
commit
7fb41d6250
Notes:
sideshowbarker
2024-07-18 07:17:00 +09:00
Author: https://github.com/BertalanD Commit: https://github.com/SerenityOS/serenity/commit/7fb41d6250b Pull-request: https://github.com/SerenityOS/serenity/pull/8718 Issue: https://github.com/SerenityOS/serenity/issues/363 Reviewed-by: https://github.com/gunnarbeutner ✅ Reviewed-by: https://github.com/nico
1 changed files with 5 additions and 5 deletions
|
@ -475,12 +475,12 @@ void Screen::constrain_pending_flush_rects()
|
|||
rects.add(intersected_rect);
|
||||
}
|
||||
fb_data.pending_flush_rects.clear_with_capacity();
|
||||
for (auto& rect : rects.rects()) {
|
||||
for (auto const& rect : rects.rects()) {
|
||||
fb_data.pending_flush_rects.append({
|
||||
x : (unsigned)rect.x(),
|
||||
y : (unsigned)rect.y(),
|
||||
width : (unsigned)rect.width(),
|
||||
height : (unsigned)rect.height()
|
||||
.x = (unsigned)rect.x(),
|
||||
.y = (unsigned)rect.y(),
|
||||
.width = (unsigned)rect.width(),
|
||||
.height = (unsigned)rect.height(),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue