diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-10-07 14:04:07 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-10-07 14:04:07 +0400 |
commit | 8a4fe62843f8aa311226f543d14bd3e5440ffe7d (patch) | |
tree | c8dc58cda87f525acb567796c80164ef3a8f8050 /source/blender/blenlib/intern/math_color.c | |
parent | c9453b1357dcb878dff6efc9dd3597452d6dc762 (diff) |
misc fixes found with clang's static checker.
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 2b6a091cc8d..f0ef8b2c93d 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -25,6 +25,7 @@ * ***** END GPL LICENSE BLOCK ***** * */ +#include <assert.h> #include "BLI_math.h" @@ -133,6 +134,8 @@ void rgb_to_ycc(float r, float g, float b, float *ly, float *lcb, float *lcr, in cb=(-0.16874f*sr)-(0.33126f*sg)+(0.5f*sb)+128.0f; cr=(0.5f*sr)-(0.41869f*sg)-(0.08131f*sb)+128.0f; break; + default: + assert(!"invalid colorspace"); } *ly=y; @@ -163,6 +166,8 @@ void ycc_to_rgb(float y, float cb, float cr, float *lr, float *lg, float *lb, in g=y-0.34414f*cb - 0.71414f*cr + 135.45984f; b=y+1.772f*cb - 226.816f; break; + default: + assert(!"invalid colorspace"); } *lr=r/255.0f; *lg=g/255.0f; |