[Bf-blender-cvs] [ea5f9fe] master: Cleanup: function arg wrapping
Campbell Barton
noreply at git.blender.org
Tue May 5 08:57:12 CEST 2015
Commit: ea5f9fee8da4086adeb4ce902e9d58c446ef4ac8
Author: Campbell Barton
Date: Tue May 5 15:59:26 2015 +1000
Branches: master
https://developer.blender.org/rBea5f9fee8da4086adeb4ce902e9d58c446ef4ac8
Cleanup: function arg wrapping
===================================================================
M source/blender/bmesh/operators/bmo_bridge.c
M source/blender/bmesh/operators/bmo_connect_pair.c
M source/blender/bmesh/operators/bmo_dupe.c
M source/blender/bmesh/operators/bmo_fill_attribute.c
M source/blender/bmesh/operators/bmo_fill_grid.c
M source/blender/bmesh/operators/bmo_hull.c
M source/blender/bmesh/operators/bmo_join_triangles.c
M source/blender/bmesh/operators/bmo_removedoubles.c
M source/blender/bmesh/operators/bmo_subdivide.c
M source/blender/bmesh/operators/bmo_subdivide_edgering.c
===================================================================
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c
index 6002dcf..b4570e0 100644
--- a/source/blender/bmesh/operators/bmo_bridge.c
+++ b/source/blender/bmesh/operators/bmo_bridge.c
@@ -87,8 +87,9 @@ static void bm_vert_loop_pair(BMesh *bm, BMVert *v1, BMVert *v2, BMLoop **l1, BM
}
/* el_b can have any offset */
-static float bm_edgeloop_offset_length(LinkData *el_a, LinkData *el_b,
- LinkData *el_b_first, const float len_max)
+static float bm_edgeloop_offset_length(
+ LinkData *el_a, LinkData *el_b,
+ LinkData *el_b_first, const float len_max)
{
float len = 0.0f;
BLI_assert(el_a->prev == NULL); /* must be first */
@@ -137,10 +138,11 @@ static bool bm_edge_test_cb(BMEdge *e, void *bm_v)
return BMO_elem_flag_test((BMesh *)bm_v, e, EDGE_MARK);
}
-static void bridge_loop_pair(BMesh *bm,
- struct BMEdgeLoopStore *el_store_a,
- struct BMEdgeLoopStore *el_store_b,
- const bool use_merge, const float merge_factor, const int twist_offset)
+static void bridge_loop_pair(
+ BMesh *bm,
+ struct BMEdgeLoopStore *el_store_a,
+ struct BMEdgeLoopStore *el_store_b,
+ const bool use_merge, const float merge_factor, const int twist_offset)
{
const float eps = 0.00001f;
LinkData *el_a_first, *el_b_first;
diff --git a/source/blender/bmesh/operators/bmo_connect_pair.c b/source/blender/bmesh/operators/bmo_connect_pair.c
index fbc128b..cf0e233 100644
--- a/source/blender/bmesh/operators/bmo_connect_pair.c
+++ b/source/blender/bmesh/operators/bmo_connect_pair.c
@@ -152,8 +152,9 @@ static void min_dist_dir_update(MinDistDir *dist, const float dist_dir[3])
/** \} */
-static int state_isect_co_pair(const PathContext *pc,
- const float co_a[3], const float co_b[3])
+static int state_isect_co_pair(
+ const PathContext *pc,
+ const float co_a[3], const float co_b[3])
{
const float diff_a = dot_m3_v3_row_x((float (*)[3])pc->matrix, co_a) - pc->axis_sep;
const float diff_b = dot_m3_v3_row_x((float (*)[3])pc->matrix, co_b) - pc->axis_sep;
@@ -169,15 +170,17 @@ static int state_isect_co_pair(const PathContext *pc,
}
}
-static int state_isect_co_exact(const PathContext *pc,
- const float co[3])
+static int state_isect_co_exact(
+ const PathContext *pc,
+ const float co[3])
{
const float diff = dot_m3_v3_row_x((float (*)[3])pc->matrix, co) - pc->axis_sep;
return (fabsf(diff) <= CONNECT_EPS);
}
-static float state_calc_co_pair_fac(const PathContext *pc,
- const float co_a[3], const float co_b[3])
+static float state_calc_co_pair_fac(
+ const PathContext *pc,
+ const float co_a[3], const float co_b[3])
{
float diff_a, diff_b, diff_tot;
@@ -187,9 +190,10 @@ static float state_calc_co_pair_fac(const PathContext *pc,
return (diff_tot > FLT_EPSILON) ? (diff_a / diff_tot) : 0.5f;
}
-static void state_calc_co_pair(const PathContext *pc,
- const float co_a[3], const float co_b[3],
- float r_co[3])
+static void state_calc_co_pair(
+ const PathContext *pc,
+ const float co_a[3], const float co_b[3],
+ float r_co[3])
{
const float fac = state_calc_co_pair_fac(pc, co_a, co_b);
interp_v3_v3v3(r_co, co_a, co_b, fac);
@@ -213,8 +217,9 @@ static bool state_link_find(const PathLinkState *state, BMElem *ele)
return false;
}
-static void state_link_add(PathContext *pc, PathLinkState *state,
- BMElem *ele, BMElem *ele_from)
+static void state_link_add(
+ PathContext *pc, PathLinkState *state,
+ BMElem *ele, BMElem *ele_from)
{
PathLink *step_new = BLI_mempool_alloc(pc->link_pool);
BLI_assert(ele != ele_from);
diff --git a/source/blender/bmesh/operators/bmo_dupe.c b/source/blender/bmesh/operators/bmo_dupe.c
index a5a6480..33048e6 100644
--- a/source/blender/bmesh/operators/bmo_dupe.c
+++ b/source/blender/bmesh/operators/bmo_dupe.c
@@ -44,9 +44,10 @@
*
* Copy an existing vertex from one bmesh to another.
*/
-static BMVert *bmo_vert_copy(BMOperator *op,
- BMOpSlot *slot_vertmap_out,
- BMesh *bm_dst, BMesh *bm_src, BMVert *v_src, GHash *vhash)
+static BMVert *bmo_vert_copy(
+ BMOperator *op,
+ BMOpSlot *slot_vertmap_out,
+ BMesh *bm_dst, BMesh *bm_src, BMVert *v_src, GHash *vhash)
{
BMVert *v_dst;
@@ -72,12 +73,13 @@ static BMVert *bmo_vert_copy(BMOperator *op,
*
* Copy an existing edge from one bmesh to another.
*/
-static BMEdge *bmo_edge_copy(BMOperator *op,
- BMOpSlot *slot_edgemap_out,
- BMOpSlot *slot_boundarymap_out,
- BMesh *bm_dst, BMesh *bm_src,
- BMEdge *e_src,
- GHash *vhash, GHash *ehash)
+static BMEdge *bmo_edge_copy(
+ BMOperator *op,
+ BMOpSlot *slot_edgemap_out,
+ BMOpSlot *slot_boundarymap_out,
+ BMesh *bm_dst, BMesh *bm_src,
+ BMEdge *e_src,
+ GHash *vhash, GHash *ehash)
{
BMEdge *e_dst;
BMVert *e_dst_v1, *e_dst_v2;
@@ -131,11 +133,12 @@ static BMEdge *bmo_edge_copy(BMOperator *op,
*
* Copy an existing face from one bmesh to another.
*/
-static BMFace *bmo_face_copy(BMOperator *op,
- BMOpSlot *slot_facemap_out,
- BMesh *bm_dst, BMesh *bm_src,
- BMFace *f_src,
- GHash *vhash, GHash *ehash)
+static BMFace *bmo_face_copy(
+ BMOperator *op,
+ BMOpSlot *slot_facemap_out,
+ BMesh *bm_dst, BMesh *bm_src,
+ BMFace *f_src,
+ GHash *vhash, GHash *ehash)
{
BMFace *f_dst;
BMVert **vtar = BLI_array_alloca(vtar, f_src->len);
diff --git a/source/blender/bmesh/operators/bmo_fill_attribute.c b/source/blender/bmesh/operators/bmo_fill_attribute.c
index d9f50ac..85bca74 100644
--- a/source/blender/bmesh/operators/bmo_fill_attribute.c
+++ b/source/blender/bmesh/operators/bmo_fill_attribute.c
@@ -61,8 +61,9 @@ static bool bm_loop_is_face_untag(BMElem *ele, void *UNUSED(user_data))
/**
* Copy all attributes from adjacent untagged faces.
*/
-static void bm_face_copy_shared_all(BMesh *bm, BMLoop *l,
- const bool use_normals, const bool use_data)
+static void bm_face_copy_shared_all(
+ BMesh *bm, BMLoop *l,
+ const bool use_normals, const bool use_data)
{
BMLoop *l_other = l->radial_next;
BMFace *f = l->f, *f_other;
@@ -90,8 +91,9 @@ static void bm_face_copy_shared_all(BMesh *bm, BMLoop *l,
/**
* Flood fill attributes.
*/
-static unsigned int bmesh_face_attribute_fill(BMesh *bm,
- const bool use_normals, const bool use_data)
+static unsigned int bmesh_face_attribute_fill(
+ BMesh *bm,
+ const bool use_normals, const bool use_data)
{
BLI_LINKSTACK_DECLARE(loop_queue_prev, BMLoop *);
BLI_LINKSTACK_DECLARE(loop_queue_next, BMLoop *);
diff --git a/source/blender/bmesh/operators/bmo_fill_grid.c b/source/blender/bmesh/operators/bmo_fill_grid.c
index dd954ad..fd1e91a 100644
--- a/source/blender/bmesh/operators/bmo_fill_grid.c
+++ b/source/blender/bmesh/operators/bmo_fill_grid.c
@@ -114,8 +114,9 @@ static void quad_verts_to_barycentric_tri(
/**
* Assign a loop pair from 2 verts (which _must_ share an edge)
*/
-static void bm_loop_pair_from_verts(BMVert *v_a, BMVert *v_b,
- BMLoop *l_pair[2])
+static void bm_loop_pair_from_verts(
+ BMVert *v_a, BMVert *v_b,
+ BMLoop *l_pair[2])
{
BMEdge *e = BM_edge_exists(v_a, v_b);
if (e->l) {
@@ -185,8 +186,9 @@ static void bm_loop_interp_from_grid_boundary_2(BMesh *bm, BMLoop *l, BMLoop *l_
/**
* Avoids calling #barycentric_weights_v2_quad often by caching weights into an array.
*/
-static void barycentric_weights_v2_grid_cache(const unsigned int xtot, const unsigned int ytot,
- float (*weight_table)[4])
+static void barycentric_weights_v2_grid_cache(
+ const unsigned int xtot, const unsigned int ytot,
+ float (*weight_table)[4])
{
float x_step = 1.0f / (float)(xtot - 1);
float y_step = 1.0f / (float)(ytot - 1);
@@ -216,9 +218,10 @@ static void barycentric_weights_v2_grid_cache(const unsigned int xtot, const uns
*
* \param v_grid 2d array of verts, all boundary verts must be set, we fill in the middle.
*/
-static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const unsigned int xtot, unsigned const int ytot,
- const short mat_nr, const bool use_smooth,
- const bool use_flip, const bool use_interp_simple)
+static void bm_grid_fill_array(
+ BMesh *bm, BMVert **v_grid, const unsigned int xtot, unsigned const int ytot,
+ const short mat_nr, const bool use_smooth,
+ const bool use_flip, const bool use_interp_simple)
{
const bool use_vert_interp = CustomData_has_interp(&bm->vdata);
const bool use_loop_interp = CustomData_has_interp(&bm->ldata);
@@ -485,10 +488,11 @@ static void bm_grid_fill_array(BMesh *bm, BMVert **v_grid, const unsigned int xt
#undef XY
}
-static void bm_grid_fill(BMesh *bm,
- struct BMEdgeLoopStore *estore_a, struct BMEdgeLoopStore *estore_b,
- struct BMEdgeLoopStore *estore_rail_a, struct BMEdgeLoopStore *estore_rail_b,
- const short mat_nr, const bool use_smooth, const bool use_interp_simple)
+static void bm_grid_fill(
+ BMesh *bm,
+ struct BMEdgeLoopStore *estore_a, struct BMEdgeLoopStore *estore_b,
+ struct BMEdgeLoopStore *estore_rail_a, struct BMEdgeLoopStore *estore_rail_b,
+ const short mat_nr, const bool use_smooth, const bool use_interp_simple)
{
#define USE_FLIP_DETECT
diff --git a/source/blender/bmesh/operators/bmo_hull.c b/source/bl
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list