Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-05-03 01:22:14 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-05-03 01:31:46 +0400
commit8d16869d833ea2a2bd548c8f7b767dae582c78f2 (patch)
tree8b4dac3292c5cb5c1c37211150633e6968814bc9 /intern/cycles/blender/blender_util.h
parent43d5e54a799b6823bca31bde17606c591b81d8be (diff)
Code cleanup: Add -Werror=float-conversion to Cycles
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r--intern/cycles/blender/blender_util.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index 2c83ee6c2b5..35e417d8069 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -57,7 +57,7 @@ static inline void colorramp_to_array(BL::ColorRamp ramp, float4 *data, int size
for(int i = 0; i < size; i++) {
float color[4];
- ramp.evaluate(i/(float)(size-1), color);
+ ramp.evaluate((float)i/(float)(size-1), color);
data[i] = make_float4(color[0], color[1], color[2], color[3]);
}
}
@@ -74,7 +74,7 @@ static inline void curvemapping_color_to_array(BL::CurveMapping cumap, float4 *d
BL::CurveMap mapI = cumap.curves[3];
for(int i = 0; i < size; i++) {
- float t = i/(float)(size-1);
+ float t = (float)i/(float)(size-1);
data[i][0] = mapR.evaluate(mapI.evaluate(t));
data[i][1] = mapG.evaluate(mapI.evaluate(t));
@@ -83,7 +83,7 @@ static inline void curvemapping_color_to_array(BL::CurveMapping cumap, float4 *d
}
else {
for(int i = 0; i < size; i++) {
- float t = i/(float)(size-1);
+ float t = (float)i/(float)(size-1);
data[i][0] = mapR.evaluate(t);
data[i][1] = mapG.evaluate(t);