Commit: d57ce42dfab8893f09c7182e74dfcfddea5aae8c
Author: Campbell Barton
Date:   Mon Nov 3 08:30:33 2014 +0100
Branches: master
https://developer.blender.org/rBd57ce42dfab8893f09c7182e74dfcfddea5aae8c

BMesh: arg reorder

===================================================================

M       source/blender/bmesh/intern/bmesh_iterators.c
M       source/blender/bmesh/intern/bmesh_iterators.h
M       source/blender/bmesh/tools/bmesh_path.c
M       source/blender/bmesh/tools/bmesh_path.h
M       source/blender/editors/mesh/editmesh_path.c

===================================================================

diff --git a/source/blender/bmesh/intern/bmesh_iterators.c 
b/source/blender/bmesh/intern/bmesh_iterators.c
index 476878a..4dc27d7 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.c
+++ b/source/blender/bmesh/intern/bmesh_iterators.c
@@ -56,7 +56,7 @@ const char bm_iter_itype_htype_map[BM_ITYPE_MAX] = {
 /**
  * Utility function.
  */
-int BM_iter_mesh_count(BMesh *bm, const char itype)
+int BM_iter_mesh_count(const char itype, BMesh *bm)
 {
        int count;
 
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h 
b/source/blender/bmesh/intern/bmesh_iterators.h
index 44be707..792a9cd 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -94,7 +94,7 @@ extern const char bm_iter_itype_htype_map[BM_ITYPE_MAX];
 #ifdef DEBUG
 #  define BM_ITER_MESH_MUTABLE(ele, ele_next, iter, bm, itype) \
        for (ele = BM_iter_new(iter, bm, itype, NULL); \
-       ele ? ((void)((iter)->count = BM_iter_mesh_count(bm, itype)), \
+       ele ? ((void)((iter)->count = BM_iter_mesh_count(itype, bm)), \
               (void)(ele_next = BM_iter_step(iter)), 1) : 0; \
        ele = ele_next)
 #else
@@ -185,7 +185,6 @@ typedef struct BMIter {
        char itype;
 } BMIter;
 
-int     BM_iter_mesh_count(BMesh *bm, const char itype);
 void   *BM_iter_at_index(BMesh *bm, const char itype, void *data, int index) 
ATTR_WARN_UNUSED_RESULT;
 int     BM_iter_as_array(BMesh *bm, const char itype, void *data, void 
**array, const int len);
 void   *BM_iter_as_arrayN(BMesh *bm, const char itype, void *data, int *r_len,
@@ -196,9 +195,9 @@ void    *BMO_iter_as_arrayN(BMOpSlot 
slot_args[BMO_OP_MAX_SLOTS], const char *sl
                             int *r_len,
                             /* optional args to avoid an alloc (normally stack 
array) */
                             void **stack_array, int stack_array_size);
-
 int     BM_iter_elem_count_flag(const char itype, void *data, const char 
hflag, const bool value);
 int     BMO_iter_elem_count_flag(BMesh *bm, const char itype, void *data, 
const short oflag, const bool value);
+int     BM_iter_mesh_count(const char itype, BMesh *bm);
 int     BM_iter_mesh_count_flag(const char itype, BMesh *bm, const char hflag, 
const bool value);
 
 /* private for bmesh_iterators_inline.c */
diff --git a/source/blender/bmesh/tools/bmesh_path.c 
b/source/blender/bmesh/tools/bmesh_path.c
index 060d0dd..8ae3507 100644
--- a/source/blender/bmesh/tools/bmesh_path.c
+++ b/source/blender/bmesh/tools/bmesh_path.c
@@ -95,7 +95,7 @@ static void verttag_add_adjacent(Heap *heap, BMVert *v_a, 
BMVert **verts_prev, f
 
 LinkNode *BM_mesh_calc_path_vert(
         BMesh *bm, BMVert *v_src, BMVert *v_dst, const bool use_length,
-        void *user_data, bool (*test_fn)(BMVert *, void *user_data))
+        bool (*test_fn)(BMVert *, void *user_data), void *user_data)
 {
        LinkNode *path = NULL;
        /* BM_ELEM_TAG flag is used to store visited edges */
@@ -221,7 +221,7 @@ static void edgetag_add_adjacent(Heap *heap, BMEdge *e1, 
BMEdge **edges_prev, fl
 
 LinkNode *BM_mesh_calc_path_edge(
         BMesh *bm, BMEdge *e_src, BMEdge *e_dst, const bool use_length,
-        void *user_data, bool (*filter_fn)(BMEdge *, void *user_data))
+        bool (*filter_fn)(BMEdge *, void *user_data), void *user_data)
 {
        LinkNode *path = NULL;
        /* BM_ELEM_TAG flag is used to store visited edges */
@@ -347,7 +347,7 @@ static void facetag_add_adjacent(Heap *heap, BMFace *f_a, 
BMFace **faces_prev, f
 
 LinkNode *BM_mesh_calc_path_face(
         BMesh *bm, BMFace *f_src, BMFace *f_dst, const bool use_length,
-        void *user_data, bool (*test_fn)(BMFace *, void *user_data))
+        bool (*test_fn)(BMFace *, void *user_data), void *user_data)
 {
        LinkNode *path = NULL;
        /* BM_ELEM_TAG flag is used to store visited edges */
diff --git a/source/blender/bmesh/tools/bmesh_path.h 
b/source/blender/bmesh/tools/bmesh_path.h
index a13290b..7f4f7c4 100644
--- a/source/blender/bmesh/tools/bmesh_path.h
+++ b/source/blender/bmesh/tools/bmesh_path.h
@@ -29,14 +29,14 @@
 
 struct LinkNode *BM_mesh_calc_path_vert(
         BMesh *bm, BMVert *v_src, BMVert *v_dst, const bool  use_length,
-        void *user_data, bool (*filter_fn)(BMVert *, void *));
+        bool (*filter_fn)(BMVert *, void *), void *user_data);
 
 struct LinkNode *BM_mesh_calc_path_edge(
         BMesh *bm, BMEdge *e_src, BMEdge *e_dst, const bool  use_length,
-        void *user_data, bool (*filter_fn)(BMEdge *, void *));
+        bool (*filter_fn)(BMEdge *, void *), void *user_data);
 
 struct LinkNode *BM_mesh_calc_path_face(
         BMesh *bm, BMFace *f_src, BMFace *f_dst, const bool  use_length,
-        void *user_data, bool (*test_fn)(BMFace *, void *));
+        bool (*test_fn)(BMFace *, void *), void *user_data);
 
 #endif /* __BMESH_PATH_H__ */
diff --git a/source/blender/editors/mesh/editmesh_path.c 
b/source/blender/editors/mesh/editmesh_path.c
index 44d03da..1dd28c5 100644
--- a/source/blender/editors/mesh/editmesh_path.c
+++ b/source/blender/editors/mesh/editmesh_path.c
@@ -99,7 +99,7 @@ static bool mouse_mesh_shortest_path_vert(ViewContext *vc)
 
                if (v_act && (v_act != v_dst)) {
                        if ((path = BM_mesh_calc_path_vert(bm, v_act, v_dst, 
use_length,
-                                                          &user_data, 
verttag_filter_cb)))
+                                                          verttag_filter_cb, 
&user_data)))
                        {
                                BM_select_history_remove(bm, v_act);
                        }
@@ -267,7 +267,7 @@ static bool mouse_mesh_shortest_path_edge(ViewContext *vc)
 
                if (e_act && (e_act != e_dst)) {
                        if ((path = BM_mesh_calc_path_edge(bm, e_act, e_dst, 
use_length,
-                                                          &user_data, 
edgetag_filter_cb)))
+                                                          edgetag_filter_cb, 
&user_data)))
                        {
                                BM_select_history_remove(bm, e_act);
                        }
@@ -388,7 +388,7 @@ static bool mouse_mesh_shortest_path_face(ViewContext *vc)
                if (f_act) {
                        if (f_act != f_dst) {
                                if ((path = BM_mesh_calc_path_face(bm, f_act, 
f_dst, use_length,
-                                                                  &user_data, 
facetag_filter_cb)))
+                                                                  
facetag_filter_cb, &user_data)))
                                {
                                        BM_select_history_remove(bm, f_act);
                                }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to