BMesh: replace iterator with BM_face_vert_share_loop
authorCampbell Barton <ideasman42@gmail.com>
Mon, 14 Nov 2016 15:41:23 +0000 (02:41 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 14 Nov 2016 15:44:57 +0000 (02:44 +1100)
source/blender/bmesh/intern/bmesh_queries.c

index 87671805ef286ffa0904e379ce3c66499e5d2b65..cd7a1c365b29570bd96c8ee79b4deb68d73f9a4b 100644 (file)
@@ -102,17 +102,10 @@ BMLoop *BM_loop_other_edge_loop(BMLoop *l, BMVert *v)
  */
 BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v)
 {
-       BMIter liter;
-       BMLoop *l_iter;
+       BMLoop *l_iter = BM_face_vert_share_loop(f, v);
 
        BLI_assert(BM_edge_exists(v_prev, v) != NULL);
 
-       BM_ITER_ELEM (l_iter, &liter, v, BM_LOOPS_OF_VERT) {
-               if (l_iter->f == f) {
-                       break;
-               }
-       }
-
        if (l_iter) {
                if (l_iter->prev->v == v_prev) {
                        return l_iter->next;
@@ -149,7 +142,6 @@ BMLoop *BM_face_other_vert_loop(BMFace *f, BMVert *v_prev, BMVert *v)
  *                      The faces loop direction is ignored.
  * </pre>
  */
-
 BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v)
 {
 #if 0 /* works but slow */
@@ -178,9 +170,6 @@ BMLoop *BM_loop_other_vert_loop(BMLoop *l, BMVert *v)
                        return l->next->next;
                }
        }
-
-
-
 #endif
 }