[Bf-blender-cvs] [019a8bc] master: Quiet warning in Cycles
Campbell Barton
noreply at git.blender.org
Sat Jun 14 10:44:54 CEST 2014
Commit: 019a8bc23ba8f748c33a1e563ec782f2ff7d672f
Author: Campbell Barton
Date: Sat Jun 14 17:00:15 2014 +1000
https://developer.blender.org/rB019a8bc23ba8f748c33a1e563ec782f2ff7d672f
Quiet warning in Cycles
===================================================================
M intern/cycles/util/util_color.h
===================================================================
diff --git a/intern/cycles/util/util_color.h b/intern/cycles/util/util_color.h
index d362c8a..48e9e2d 100644
--- a/intern/cycles/util/util_color.h
+++ b/intern/cycles/util/util_color.h
@@ -28,7 +28,7 @@ CCL_NAMESPACE_BEGIN
ccl_device uchar float_to_byte(float val)
{
- return ((val <= 0.0f) ? 0 : (((val) > (1.0f - 0.5f / 255.0f)) ? 255 : ((255.0f * (val)) + 0.5f)));
+ return ((val <= 0.0f) ? 0 : ((val > (1.0f - 0.5f / 255.0f)) ? 255 : (uchar)((255.0f * val) + 0.5f)));
}
ccl_device uchar4 color_float_to_byte(float3 c)
More information about the Bf-blender-cvs
mailing list