diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-14 14:33:16 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-14 14:33:16 +0400 |
commit | d14ac69c8c2340575cd453bd4cf473692de69f54 (patch) | |
tree | 749abed0ea2bdb0affdbcd70bcb0ee609d2d5ad9 /source/blender/blenlib/intern/math_color.c | |
parent | 0863575816d281d4a7ffad351a8213367b6a938d (diff) |
ensure functions are not used within FTOCHAR macro since they run 2-3 times.
brushes were doing curve lookups within this macro for example.
Diffstat (limited to 'source/blender/blenlib/intern/math_color.c')
-rw-r--r-- | source/blender/blenlib/intern/math_color.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/intern/math_color.c b/source/blender/blenlib/intern/math_color.c index 3627b38a091..e9e700d355a 100644 --- a/source/blender/blenlib/intern/math_color.c +++ b/source/blender/blenlib/intern/math_color.c @@ -337,14 +337,14 @@ void cpack_to_rgb(unsigned int col, float *r, float *g, float *b) *b /= 255.0f; } -void rgb_byte_to_float(const unsigned char *in, float *out) +void rgb_byte_to_float(const unsigned char in[3], float out[3]) { out[0]= ((float)in[0]) / 255.0f; out[1]= ((float)in[1]) / 255.0f; out[2]= ((float)in[2]) / 255.0f; } -void rgb_float_to_byte(const float *in, unsigned char *out) +void rgb_float_to_byte(const float in[3], unsigned char out[3]) { int r, g, b; |