genode/repos/demo
Norman Feske bb06d879aa os: make 'Genode::Color' C++20 friendly
This patch turns 'Color' from a class to a POD type by replacing
the constructors by the named create functions 'rgb', 'clamped_rgb',
and 'clamped_rgba'. It thereby enables the initialization of Color
values using { .r = ... } syntax and makes the type usable in const
expressions.

It also narrows the type for color components and alpha values to
uint8_t. So possible integer overflows of computed values are detected
by -Wconversion.

As 'Color::rgb(0, 0, 0)' is repeatedly used as a default value, the
patch adds the 'Color::black()' function.

Fixes #5238
2024-06-20 12:54:30 +02:00
..
doc demo: update tutorial text 2024-05-29 09:18:12 +02:00
include os: make 'Genode::Color' C++20 friendly 2024-06-20 12:54:30 +02:00
lib demo: remove use of format strings from mini_c lib 2023-03-13 14:32:53 +01:00
recipes depot: update recipe hashes 2024-05-30 08:20:21 +02:00
src os: make 'Genode::Color' C++20 friendly 2024-06-20 12:54:30 +02:00