From 27ec8d5043f544685001aab3552b9b4b56bc1e1a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 30 Aug 2011 09:50:31 +0000 Subject: fix for some warnings with the recent merge, also tag unused args. --- source/blender/blenlib/intern/BLI_kdopbvh.c | 8 ++++---- source/blender/blenlib/intern/BLI_kdtree.c | 4 ++-- source/blender/blenlib/intern/graph.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/BLI_kdopbvh.c b/source/blender/blenlib/intern/BLI_kdopbvh.c index 527692348e7..dcbe043f0d0 100644 --- a/source/blender/blenlib/intern/BLI_kdopbvh.c +++ b/source/blender/blenlib/intern/BLI_kdopbvh.c @@ -1494,7 +1494,7 @@ static float fast_ray_nearest_hit(const BVHRayCastData *data, const BVHNode *nod float t2z = (bv[data->index[5]] - data->ray.origin[2]) * data->idot_axis[2]; if(t1x > t2y || t2x < t1y || t1x > t2z || t2x < t1z || t1y > t2z || t2y < t1z) return FLT_MAX; - if(t2x < 0.0 || t2y < 0.0 || t2z < 0.0) return FLT_MAX; + if(t2x < 0.0f || t2y < 0.0f || t2z < 0.0f) return FLT_MAX; if(t1x > data->hit.dist || t1y > data->hit.dist || t1z > data->hit.dist) return FLT_MAX; dist = t1x; @@ -1599,11 +1599,11 @@ int BLI_bvhtree_ray_cast(BVHTree *tree, const float *co, const float *dir, float data.ray_dot_axis[i] = INPR( data.ray.direction, KDOP_AXES[i]); data.idot_axis[i] = 1.0f / data.ray_dot_axis[i]; - if(fabs(data.ray_dot_axis[i]) < FLT_EPSILON) + if(fabsf(data.ray_dot_axis[i]) < FLT_EPSILON) { data.ray_dot_axis[i] = 0.0; } - data.index[2*i] = data.idot_axis[i] < 0.0 ? 1 : 0; + data.index[2*i] = data.idot_axis[i] < 0.0f ? 1 : 0; data.index[2*i+1] = 1 - data.index[2*i]; data.index[2*i] += 2*i; data.index[2*i+1] += 2*i; @@ -1654,7 +1654,7 @@ float BLI_bvhtree_bb_raycast(float *bv, float *light_start, float *light_end, fl dist = ray_nearest_hit(&data, bv); - if(dist > 0.0) + if(dist > 0.0f) { VECADDFAC(pos, light_start, data.ray.direction, dist); } diff --git a/source/blender/blenlib/intern/BLI_kdtree.c b/source/blender/blenlib/intern/BLI_kdtree.c index 713bfde3417..c885e8c8a9c 100644 --- a/source/blender/blenlib/intern/BLI_kdtree.c +++ b/source/blender/blenlib/intern/BLI_kdtree.c @@ -187,7 +187,7 @@ int BLI_kdtree_find_nearest(KDTree *tree, float *co, float *nor, KDTreeNearest * cur_dist = node->co[node->d] - co[node->d]; - if(cur_dist<0.0){ + if(cur_dist<0.0f){ cur_dist= -cur_dist*cur_dist; if(-cur_distco[node->d] - co[node->d]; - if(cur_dist<0.0){ + if(cur_dist<0.0f){ cur_dist= -cur_dist*cur_dist; if(foundlength - ring[i].arc->length) > limit) + if (fabsf(ring[first].arc->length - ring[i].arc->length) > limit) { dispatch = 1; } -- cgit v1.2.3