mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
bb06d879aa
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 |
||
---|---|---|
.. | ||
doc | ||
include | ||
lib | ||
recipes | ||
src |