Fix uninitialized ColorSceneLinear4f occuring in certain situations.

On gcc 11.3, Ubuntu 22.04 the default constructor for
ColorSceneLinear4f did not zero the r,g,b,a member variables. Replacing
the empty constructor with a default constructor circumvents this
problem (compiler bug? ) even though it *should* be more or less
equivalent.
This commit is contained in:
Martijn Versteegh 2022-12-23 12:01:59 +01:00
parent 4701421dbe
commit 14667de65b
1 changed files with 1 additions and 3 deletions

View File

@ -152,9 +152,7 @@ BLI_INLINE ColorTheme4<uint8_t> BLI_color_convert_to_theme4b(const ColorTheme4<f
template<eAlpha Alpha>
class ColorSceneLinear4f final : public ColorRGBA<float, eSpace::SceneLinear, Alpha> {
public:
constexpr ColorSceneLinear4f<Alpha>() : ColorRGBA<float, eSpace::SceneLinear, Alpha>()
{
}
constexpr ColorSceneLinear4f<Alpha>() = default;
constexpr ColorSceneLinear4f<Alpha>(const float *rgba)
: ColorRGBA<float, eSpace::SceneLinear, Alpha>(rgba)