[Bf-blender-cvs] [56edaf7] master: Fix stupid strict flags in math_color_inline.c
Sergey Sharybin
noreply at git.blender.org
Fri Mar 20 08:26:23 CET 2015
Commit: 56edaf78673104728e771b835215c111de9528b2
Author: Sergey Sharybin
Date: Fri Mar 20 12:25:14 2015 +0500
Branches: master
https://developer.blender.org/rB56edaf78673104728e771b835215c111de9528b2
Fix stupid strict flags in math_color_inline.c
It was unleashed with recent ghash commit and issue seems to
be the same as fixed in 69065b5b.
===================================================================
M source/blender/blenlib/BLI_utildefines.h
===================================================================
diff --git a/source/blender/blenlib/BLI_utildefines.h b/source/blender/blenlib/BLI_utildefines.h
index 1e8440e..2ddc8fa 100644
--- a/source/blender/blenlib/BLI_utildefines.h
+++ b/source/blender/blenlib/BLI_utildefines.h
@@ -252,7 +252,7 @@ extern "C" {
#define FTOCHAR(val) ((CHECK_TYPE_INLINE(val, float)), \
(char)(((val) <= 0.0f) ? 0 : (((val) > (1.0f - 0.5f / 255.0f)) ? 255 : ((255.0f * (val)) + 0.5f))))
#define FTOUSHORT(val) ((CHECK_TYPE_INLINE(val, float)), \
- ((val >= 1.0f - 0.5f / 65535) ? 65535 : (val <= 0.0f) ? 0 : (unsigned short)(val * 65535.0f + 0.5f)))
+ (unsigned short)((val >= 1.0f - 0.5f / 65535) ? 65535 : (val <= 0.0f) ? 0 : (val * 65535.0f + 0.5f)))
#define USHORTTOUCHAR(val) ((unsigned char)(((val) >= 65535 - 128) ? 255 : ((val) + 128) >> 8))
#define F3TOCHAR3(v2, v1) { \
(v1)[0] = FTOCHAR((v2[0])); \
More information about the Bf-blender-cvs
mailing list