style cleanup
authorCampbell Barton <ideasman42@gmail.com>
Wed, 4 Sep 2013 03:30:41 +0000 (03:30 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 4 Sep 2013 03:30:41 +0000 (03:30 +0000)
source/blender/blenkernel/intern/editmesh_bvh.c
source/blender/editors/mesh/editmesh_knife.c
source/blender/windowmanager/WM_api.h

index ab8d223dd717a1bf02df4172226f31dd8fdd9993..5b00e5a83acc0c7e44a6316aee5d29cdb6ace80f 100644 (file)
@@ -197,11 +197,13 @@ static void bmbvh_ray_cast_cb(void *userdata, int index, const BVHTreeRay *ray,
 
        bmbvh_tri_from_face(tri_cos, ltri, bmcb_data->cos_cage);
 
-       isect = ray->radius > 0.0f ?
-               isect_ray_tri_epsilon_v3(ray->origin, ray->direction, tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv, ray->radius) :
-               isect_ray_tri_v3(ray->origin, ray->direction, tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv);
-       if (isect && dist < hit->dist)
-       {
+       isect = (ray->radius > 0.0f ?
+                isect_ray_tri_epsilon_v3(ray->origin, ray->direction,
+                                         tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv, ray->radius) :
+                isect_ray_tri_v3(ray->origin, ray->direction,
+                                 tri_cos[0], tri_cos[1], tri_cos[2], &dist, uv));
+
+       if (isect && dist < hit->dist) {
                hit->dist = dist;
                hit->index = index;
 
index 1d73861c45348546cc1525c7bad185a000143a99..cc3d486c2f364c2f314248a5384775687d8ac51c 100644 (file)
@@ -500,7 +500,8 @@ static void knife_add_single_cut(KnifeTool_OpData *kcd)
        KnifeEdge *kfe = new_knife_edge(kcd), *kfe2 = NULL, *kfe3 = NULL;
 
        if ((kcd->prev.vert && kcd->prev.vert == kcd->curr.vert) ||
-           (kcd->prev.edge && kcd->prev.edge == kcd->curr.edge)) {
+           (kcd->prev.edge && kcd->prev.edge == kcd->curr.edge))
+       {
                kcd->prev = kcd->curr;
                return;
        }
@@ -594,10 +595,14 @@ static int find_connected_linehit(KnifeTool_OpData *kcd, int testi, BMFace *f, i
                if (testi >= 0 && testi < kcd->totlinehit) {
                        if (knife_find_common_face(&kcd->linehits[testi].kfe->faces,
                                                   &kcd->linehits[i].kfe->faces))
+                       {
                                return i;
+                       }
                        else if (kcd->linehits[testi].v &&
-                                kcd->linehits[testi].v == kcd->linehits[i].v)
+                                kcd->linehits[testi].v == kcd->linehits[i].v)
+                       {
                                return i;
+                       }
                }
                else if (f) {
                        if (find_ref(&kcd->linehits[i].kfe->faces, f))
@@ -722,7 +727,8 @@ static void knife_get_edge_faces(KnifeTool_OpData *kcd, KnifeEdge *kfe, ListBase
 }
 #endif
 
-static void copy_hit_from_posdata(BMEdgeHit *lh, KnifePosData *pos, float lambda) {
+static void copy_hit_from_posdata(BMEdgeHit *lh, KnifePosData *pos, float lambda)
+{
        lh->kfe = pos->edge;
        lh->v = pos->vert;
        lh->f = pos->bmface;
@@ -1244,7 +1250,8 @@ static BMEdgeHit *knife_edge_tri_isect(KnifeTool_OpData *kcd, BMBVHTree *bmtree,
 
                        n_isects = 0;
                        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) {
+                           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);
index 455fbf4e50abc85261c8f15e28bd3c45dac826e6..4480b8ab158c43157458420d6dbc905dad5852c7 100644 (file)
@@ -144,9 +144,9 @@ struct wmEventHandler *WM_event_add_keymap_handler_priority(ListBase *handlers,
 void           WM_event_remove_keymap_handler(ListBase *handlers, wmKeyMap *keymap);
 
 struct wmEventHandler *WM_event_add_ui_handler(
-               const struct bContext *C, ListBase *handlers,
-               int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
-               void (*remove)(struct bContext *C, void *userdata), void *userdata);
+        const struct bContext *C, ListBase *handlers,
+        int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),
+        void (*remove)(struct bContext *C, void *userdata), void *userdata);
 
 void           WM_event_remove_ui_handler(ListBase *handlers,
                                        int (*func)(struct bContext *C, const struct wmEvent *event, void *userdata),