quiet compiler warnings
authorCampbell Barton <ideasman42@gmail.com>
Fri, 30 Aug 2013 16:52:54 +0000 (16:52 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 30 Aug 2013 16:52:54 +0000 (16:52 +0000)
intern/cycles/render/sky_model.cpp
source/blender/editors/mesh/editmesh_bisect.c
source/blender/editors/mesh/editmesh_knife.c

index 2195b97935fbe5ca6368a9e204399523908d3b43..3bfb5e1cc00041f17ce9c5945de0034c33e59e47 100644 (file)
@@ -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
index 6a751a500babcea04fce756c63b4f4bb2823e950..5968e0991d13606ead3a55c962100be34cb0396b 100644 (file)
@@ -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;
 
index 5fe0019281fe6ce49b9203ff96b6e2e24ad94dbc..70bfd6fac6d30940162c14c99ab0360491ff515b 100644 (file)
@@ -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);