From e8605f9df9423bb0a7357157736ebe59f222c38f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 30 Aug 2013 16:52:54 +0000 Subject: [PATCH] quiet compiler warnings --- intern/cycles/render/sky_model.cpp | 8 -------- source/blender/editors/mesh/editmesh_bisect.c | 3 ++- source/blender/editors/mesh/editmesh_knife.c | 4 ++-- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/intern/cycles/render/sky_model.cpp b/intern/cycles/render/sky_model.cpp index 2195b97935f..3bfb5e1cc00 100644 --- a/intern/cycles/render/sky_model.cpp +++ b/intern/cycles/render/sky_model.cpp @@ -110,10 +110,6 @@ CCL_NAMESPACE_BEGIN // Some macro definitions that occur elsewhere in ART, and that have to be // replicated to make this a stand-alone module. -#ifndef NIL -#define NIL 0 -#endif - #ifndef MATH_PI #define MATH_PI 3.141592653589793 #endif @@ -122,10 +118,6 @@ CCL_NAMESPACE_BEGIN #define MATH_DEG_TO_RAD ( MATH_PI / 180.0 ) #endif -#ifndef MATH_RAD_TO_DEG -#define MATH_RAD_TO_DEG ( 180.0 / MATH_PI ) -#endif - #ifndef DEGREES #define DEGREES * MATH_DEG_TO_RAD #endif diff --git a/source/blender/editors/mesh/editmesh_bisect.c b/source/blender/editors/mesh/editmesh_bisect.c index 6a751a500ba..5968e0991d1 100644 --- a/source/blender/editors/mesh/editmesh_bisect.c +++ b/source/blender/editors/mesh/editmesh_bisect.c @@ -78,10 +78,11 @@ static bool mesh_bisect_interactive_calc( int x_end = RNA_int_get(op->ptr, "xend"); int y_end = RNA_int_get(op->ptr, "yend"); + /* reference location (some point infront of the view) for finding a point on a plane */ const float *co_ref = rv3d->ofs; float co_a_ss[2] = {x_start, y_start}, co_b_ss[2] = {x_end, y_end}, co_delta_ss[2]; float co_a[3], co_b[3]; - float zfac = ED_view3d_calc_zfac(rv3d, co_ref, NULL); + const float zfac = ED_view3d_calc_zfac(rv3d, co_ref, NULL); opdata = gesture->userdata; diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c index 5fe0019281f..70bfd6fac6d 100644 --- a/source/blender/editors/mesh/editmesh_knife.c +++ b/source/blender/editors/mesh/editmesh_knife.c @@ -1243,8 +1243,8 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree, } n_isects = 0; - if (fabs(dist_to_plane_v3(kfe->v1->cageco, tri_plane)) < KNIFE_FLT_EPS && - fabs(dist_to_plane_v3(kfe->v2->cageco, tri_plane)) < KNIFE_FLT_EPS) { + if (fabsf(dist_to_plane_v3(kfe->v1->cageco, tri_plane)) < KNIFE_FLT_EPS && + fabsf(dist_to_plane_v3(kfe->v2->cageco, tri_plane)) < KNIFE_FLT_EPS) { /* both kfe ends are in cutting triangle */ copy_v3_v3(isects[0], kfe->v1->cageco); copy_v3_v3(isects[1], kfe->v2->cageco);