diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-05 17:26:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-05 17:26:39 +0400 |
commit | 9ddbd8329e51582a0a5a1e6e397d2f75e5e9c0d6 (patch) | |
tree | 7f2054646503b97079892ee841ec590d207086fb /source/blender/render/intern | |
parent | aff4c781eb27ea88a0bde0e8e0fef1691488841e (diff) |
fix uninitialized memory use for mask feather points, also remove some double promotions.
Diffstat (limited to 'source/blender/render/intern')
-rw-r--r-- | source/blender/render/intern/raytrace/bvh.h | 2 | ||||
-rw-r--r-- | source/blender/render/intern/raytrace/rayobject_instance.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/render/intern/raytrace/bvh.h b/source/blender/render/intern/raytrace/bvh.h index a0d730c5b8a..103c04a590f 100644 --- a/source/blender/render/intern/raytrace/bvh.h +++ b/source/blender/render/intern/raytrace/bvh.h @@ -133,7 +133,7 @@ static void bvh_bb(Tree *obj, float *min, float *max) template<class Tree> static float bvh_cost(Tree *obj) { - assert(obj->cost >= 0.0); + assert(obj->cost >= 0.0f); return obj->cost; } diff --git a/source/blender/render/intern/raytrace/rayobject_instance.cpp b/source/blender/render/intern/raytrace/rayobject_instance.cpp index bfbc1c64133..c3e761ae069 100644 --- a/source/blender/render/intern/raytrace/rayobject_instance.cpp +++ b/source/blender/render/intern/raytrace/rayobject_instance.cpp @@ -118,7 +118,7 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec) for (i = 0; i < 3; i++) { isec->idot_axis[i] = 1.0f / isec->dir[i]; - isec->bv_index[2 * i] = isec->idot_axis[i] < 0.0 ? 1 : 0; + isec->bv_index[2 * i] = isec->idot_axis[i] < 0.0f ? 1 : 0; isec->bv_index[2 * i + 1] = 1 - isec->bv_index[2 * i]; isec->bv_index[2 * i] = i + 3 * isec->bv_index[2 * i]; @@ -161,7 +161,7 @@ static int RE_rayobject_instance_intersect(RayObject *o, Isect *isec) // restore bv_index for (i = 0; i < 3; i++) { - isec->bv_index[2 * i] = isec->idot_axis[i] < 0.0 ? 1 : 0; + isec->bv_index[2 * i] = isec->idot_axis[i] < 0.0f ? 1 : 0; isec->bv_index[2 * i + 1] = 1 - isec->bv_index[2 * i]; isec->bv_index[2 * i] = i + 3 * isec->bv_index[2 * i]; |