Code cleanup / Cycles:
authorThomas Dinges <blender@dingto.org>
Thu, 27 Jun 2013 15:48:16 +0000 (15:48 +0000)
committerThomas Dinges <blender@dingto.org>
Thu, 27 Jun 2013 15:48:16 +0000 (15:48 +0000)
* Some cleanup for castings.

intern/cycles/blender/blender_curves.cpp
intern/cycles/util/util_math.h
source/blender/blenkernel/BKE_blender.h

index 56d78fb5c269f4fba2d725709a33f6356d7378fb..27c52797f5fb64caa0e65d608a2d78b4b4112f92 100644 (file)
@@ -183,7 +183,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par
                                int mi = clamp(b_psys.settings().material()-1, 0, mesh->used_shaders.size()-1);
                                int shader = mesh->used_shaders[mi];
                                int draw_step = background ? b_psys.settings().render_step() : b_psys.settings().draw_step();
-                               int ren_step = (int)pow((float)2.0f,(float)draw_step);
+                               int ren_step = (int)powf(2.0f, (float)draw_step);
                                int totparts = b_psys.particles.length();
                                int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_psys.settings().draw_percentage() / 100.0f);
                                int totcurves = totchild;
index 05ed8a2d3f6f65baf9c6c53d597cb0b8aa7b7c69..14ebf311a4b3a2e89070de75f161ee3930bc03c2 100644 (file)
@@ -1166,7 +1166,7 @@ __device float safe_powf(float a, float b)
                return 1.0f;
        if(a == 0.0f)
                return 0.0f;
-       if(a < 0.0f && b != (int)b)
+       if(a < 0.0f && b != float_to_int(b))
                return 0.0f;
        
        return compatible_powf(a, b);
index dfab15a6f12ff75df8f61d7bdb13f0db9713b572..9e874c9aa151f1e2137341d14f8f3fa7295533b0 100644 (file)
@@ -52,7 +52,7 @@ extern "C" {
 /* can be left blank, otherwise a,b,c... etc with no quotes */
 #define BLENDER_VERSION_CHAR    b
 /* alpha/beta/rc/release, docs use this */
-#define BLENDER_VERSION_CYCLE   alpha
+#define BLENDER_VERSION_CYCLE   rc
 
 extern char versionstr[]; /* from blender.c */