diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-30 13:50:31 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-30 13:50:31 +0400 |
commit | 27ec8d5043f544685001aab3552b9b4b56bc1e1a (patch) | |
tree | 2daae712833a6951ae0b3ccf73010202a3b9611d /source/blender/blenlib | |
parent | c7dcbdb830b3db615df1722922d0d40660ac3b5e (diff) |
fix for some warnings with the recent merge, also tag unused args.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdopbvh.c | 8 | ||||
-rw-r--r-- | source/blender/blenlib/intern/BLI_kdtree.c | 4 | ||||
-rw-r--r-- | source/blender/blenlib/intern/graph.c | 2 |
3 files changed, 7 insertions, 7 deletions
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_dist<min_dist){ @@ -294,7 +294,7 @@ int BLI_kdtree_find_n_nearest(KDTree *tree, int n, float *co, float *nor, KDTree 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(found<n || -cur_dist<nearest[found-1].dist){ diff --git a/source/blender/blenlib/intern/graph.c b/source/blender/blenlib/intern/graph.c index 51e639d1c75..2e26f4bd9c9 100644 --- a/source/blender/blenlib/intern/graph.c +++ b/source/blender/blenlib/intern/graph.c @@ -714,7 +714,7 @@ static void handleRadialSymmetry(BGraph *graph, BNode *root_node, int depth, flo int dispatch = 0; int last = i - 1; - if (fabs(ring[first].arc->length - ring[i].arc->length) > limit) + if (fabsf(ring[first].arc->length - ring[i].arc->length) > limit) { dispatch = 1; } |