diff options
author | David Robillard <d@drobilla.net> | 2014-11-27 04:15:30 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-27 04:15:30 -0500 |
commit | 3d4b1d324e93b5d7c0aa6acf1a1c5d82f4975688 (patch) | |
tree | 66e0ba255870a8b4657b0d927be25c70a166382a /libs/canvas/colors.cc | |
parent | 25e1eddc50219dca119bc55370c3e2a5dd776752 (diff) |
Fix calculation using uninitialized value.
Implicit "this" is the devil.
Diffstat (limited to 'libs/canvas/colors.cc')
-rw-r--r-- | libs/canvas/colors.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/canvas/colors.cc b/libs/canvas/colors.cc index be55d2b7e2..b053e2d1de 100644 --- a/libs/canvas/colors.cc +++ b/libs/canvas/colors.cc @@ -409,15 +409,15 @@ HSV::distance (const HSV& other) const double sL, sA, sB; double oL, oA, oB; - double r, g, b, a; + double r, g, b, alpha; // Careful, "a" is a field of this Color c; c = hsva_to_color (h, s, v, a); - color_to_rgba (c, r, g, b, a); + color_to_rgba (c, r, g, b, alpha); Rgb2Lab (&sL, &sA, &sB, r, g, b); c = hsva_to_color (other.h, other.s, other.v, other.a); - color_to_rgba (c, r, g, b, a); + color_to_rgba (c, r, g, b, alpha); Rgb2Lab (&oL, &oA, &oB, r, g, b); // Weighting factors depending on the application (1 = default) |