mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-14 14:37:41 +00:00
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
This directory is a source-code repository containing Genode-specific services and applications. In contrast to the components hosted in the 'os' repository, programs contained in 'gems' are able to leverage the functionalities provided by higher-level repositories such as 'libports'. To use the 'gems' repository, make sure to also add those repositories to your build configuraion.