code cleanup: minor changes, replace len_v3 with len_squared_v3 for comparison.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 21 Jan 2013 18:45:31 +0000 (18:45 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 21 Jan 2013 18:45:31 +0000 (18:45 +0000)
source/blender/bmesh/intern/bmesh_polygon.c
source/blender/editors/interface/interface_widgets.c
source/blender/editors/mask/mask_draw.c
source/blender/modifiers/intern/MOD_meshcache.c

index 62bd264..5c3d164 100644 (file)
@@ -319,7 +319,7 @@ void poly_rotate_plane(const float normal[3], float (*verts)[3], const int nvert
        if (angle < FLT_EPSILON)
                return;
 
-       if (len_v3(axis) < FLT_EPSILON) {
+       if (len_squared_v3(axis) < FLT_EPSILON) {
                axis[0] = 0.0f;
                axis[1] = 1.0f;
                axis[2] = 0.0f;
index 18c462b..142ea51 100644 (file)
@@ -346,7 +346,7 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, const rcti *re
                          (roundboxalign & (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) == (UI_CNR_TOP_RIGHT | UI_CNR_BOTTOM_RIGHT)) ? 1 : 2;
 
        minsize = min_ii(BLI_rcti_size_x(rect) * hnum,
-                      BLI_rcti_size_y(rect) * vnum);
+                        BLI_rcti_size_y(rect) * vnum);
        
        if (2.0f * rad > minsize)
                rad = 0.5f * minsize;
index 74cdf4c..af9d334 100644 (file)
@@ -409,7 +409,7 @@ static void draw_spline_curve(const bContext *C, MaskLayer *masklay, MaskSpline
                               int width, int height)
 {
        const unsigned int resol = max_ii(BKE_mask_spline_feather_resolution(spline, width, height),
-                                       BKE_mask_spline_resolution(spline, width, height));
+                                         BKE_mask_spline_resolution(spline, width, height));
 
        unsigned char rgb_tmp[4];
 
index d140b89..054d95e 100644 (file)
@@ -153,11 +153,10 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 
 static void meshcache_do(
         MeshCacheModifierData *mcmd, Object *ob, DerivedMesh *UNUSED(dm),
-        float (*vertexCos_)[3], int numVerts)
+        float (*vertexCos_Real)[3], int numVerts)
 {
        float (*vertexCos_Store)[3] = (mcmd->factor < 1.0f) ?
                                      MEM_mallocN(sizeof(*vertexCos_Store) * numVerts, __func__) : NULL;
-       float (*vertexCos_Real)[3] = vertexCos_;
        float (*vertexCos)[3] = vertexCos_Store ? vertexCos_Store : vertexCos_Real;
 
        Scene *scene = mcmd->modifier.scene;