code cleanup: double promotion warnings.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 16 May 2013 17:20:56 +0000 (17:20 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 16 May 2013 17:20:56 +0000 (17:20 +0000)
intern/cycles/blender/blender_session.cpp
intern/cycles/kernel/kernel_bvh.h
intern/cycles/util/util_math.h

index 374dfa89730077cde1ce4705943cc6bf698f4fd8..de648298ba351e08ba647e8ef1efd9440ef25548 100644 (file)
@@ -518,7 +518,7 @@ bool BlenderSession::draw(int w, int h)
                                start_resize_time = time_dt();
                                tag_redraw();
                        }
-                       else if(time_dt() - start_resize_time < 0.2f) {
+                       else if(time_dt() - start_resize_time < 0.2) {
                                tag_redraw();
                        }
                        else {
index 9e0d4847a1f8ff989b07bb1faa3b8c7d3fc3fd74..f529cc379bd287fb0f94effe727a1e49275c7e81 100644 (file)
@@ -470,9 +470,9 @@ __device_inline void bvh_cardinal_curve_intersect(KernelGlobals *kg, Intersectio
                                        float d0 = d - r_curr;
                                        float d1 = d + r_curr;
                                        if (d0 >= 0)
-                                               coverage = (min(d1 / mw_extension, 1.0f) - min(d0 / mw_extension, 1.0f)) * 0.5;
+                                               coverage = (min(d1 / mw_extension, 1.0f) - min(d0 / mw_extension, 1.0f)) * 0.5f;
                                        else // inside
-                                               coverage = (min(d1 / mw_extension, 1.0f) + min(-d0 / mw_extension, 1.0f)) * 0.5;
+                                               coverage = (min(d1 / mw_extension, 1.0f) + min(-d0 / mw_extension, 1.0f)) * 0.5f;
                                }
                                
                                if (p_curr.x * p_curr.x + p_curr.y * p_curr.y >= r_ext * r_ext || p_curr.z <= epsilon) {
index 6b85e06c25d9ad39c1284bf0ed13888a7e808a7c..6edf7fa354496ac4cf76248cd19a62fa9f209739 100644 (file)
@@ -1130,7 +1130,7 @@ __device float compatible_powf(float x, float y)
 {
        /* GPU pow doesn't accept negative x, do manual checks here */
        if(x < 0.0f) {
-               if(fmod(-y, 2.0f) == 0.0f)
+               if(fmodf(-y, 2.0f) == 0.0f)
                        return powf(-x, y);
                else
                        return -powf(-x, y);