[Bf-blender-cvs] [b64e36d] master: BLI_listbase: consistent name prefix

Campbell Barton noreply at git.blender.org
Wed Jul 30 07:02:05 CEST 2014


Commit: b64e36d26dac8463c0f4a1dc1dbd9cf1ef27e0d9
Author: Campbell Barton
Date:   Wed Jul 30 15:01:16 2014 +1000
Branches: master
https://developer.blender.org/rBb64e36d26dac8463c0f4a1dc1dbd9cf1ef27e0d9

BLI_listbase: consistent name prefix

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

M	source/blender/blenlib/BLI_listbase.h
M	source/blender/blenlib/intern/listbase.c
M	source/blender/bmesh/intern/bmesh_edgeloop.c
M	source/blender/bmesh/operators/bmo_bridge.c
M	source/blender/bmesh/operators/bmo_subdivide_edgering.c
M	source/blender/editors/animation/anim_markers.c
M	source/blender/editors/mesh/editmesh_tools.c
M	source/blender/editors/object/object_transform.c

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

diff --git a/source/blender/blenlib/BLI_listbase.h b/source/blender/blenlib/BLI_listbase.h
index b900b5f..656423b 100644
--- a/source/blender/blenlib/BLI_listbase.h
+++ b/source/blender/blenlib/BLI_listbase.h
@@ -76,8 +76,8 @@ void BLI_freelinkN(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1);
 void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1, 2);
 void BLI_duplicatelist(struct ListBase *dst, const struct ListBase *src) ATTR_NONNULL(1, 2);
 void BLI_listbase_reverse(struct ListBase *lb) ATTR_NONNULL(1);
-void BLI_rotatelist_first(struct ListBase *lb, void *vlink) ATTR_NONNULL(1, 2);
-void BLI_rotatelist_last(struct ListBase *lb, void *vlink) ATTR_NONNULL(1, 2);
+void BLI_listbase_rotate_first(struct ListBase *lb, void *vlink) ATTR_NONNULL(1, 2);
+void BLI_listbase_rotate_last(struct ListBase *lb, void *vlink) ATTR_NONNULL(1, 2);
 
 /**
  * Utility functions to avoid first/last references inline all over.
@@ -95,18 +95,18 @@ struct LinkData *BLI_genericNodeN(void *data);
  *
  * \code{.c}
  *
- * LISTBASE_CIRCULAR_FORWARD_BEGIN (listbase, item, item_init) {
+ * BLI_LISTBASE_CIRCULAR_FORWARD_BEGIN (listbase, item, item_init) {
  *     ...operate on marker...
  * }
- * LISTBASE_CIRCULAR_FORWARD_END (listbase, item, item_init);
+ * BLI_LISTBASE_CIRCULAR_FORWARD_END (listbase, item, item_init);
  *
  * \endcode
  */
-#define LISTBASE_CIRCULAR_FORWARD_BEGIN(lb, lb_iter, lb_init) \
+#define BLI_LISTBASE_CIRCULAR_FORWARD_BEGIN(lb, lb_iter, lb_init) \
 if ((lb)->first && (lb_init || (lb_init = (lb)->first))) { \
 	lb_iter = lb_init; \
 	do {
-#define LISTBASE_CIRCULAR_FORWARD_END(lb, lb_iter, lb_init) \
+#define BLI_LISTBASE_CIRCULAR_FORWARD_END(lb, lb_iter, lb_init) \
 	} while ((lb_iter  = (lb_iter)->next ? (lb_iter)->next : (lb)->first), \
 	         (lb_iter != lb_init)); \
 }
diff --git a/source/blender/blenlib/intern/listbase.c b/source/blender/blenlib/intern/listbase.c
index b0c2489..9c5f2ad 100644
--- a/source/blender/blenlib/intern/listbase.c
+++ b/source/blender/blenlib/intern/listbase.c
@@ -599,7 +599,7 @@ void BLI_listbase_reverse(ListBase *lb)
 /**
  * \param vlink Link to make first.
  */
-void BLI_rotatelist_first(ListBase *lb, void *vlink)
+void BLI_listbase_rotate_first(ListBase *lb, void *vlink)
 {
 	/* make circular */
 	((Link *)lb->first)->prev = lb->last;
@@ -615,7 +615,7 @@ void BLI_rotatelist_first(ListBase *lb, void *vlink)
 /**
  * \param vlink Link to make last.
  */
-void BLI_rotatelist_last(ListBase *lb, void *vlink)
+void BLI_listbase_rotate_last(ListBase *lb, void *vlink)
 {
 	/* make circular */
 	((Link *)lb->first)->prev = lb->last;
diff --git a/source/blender/bmesh/intern/bmesh_edgeloop.c b/source/blender/bmesh/intern/bmesh_edgeloop.c
index f01e119..e83a1d5 100644
--- a/source/blender/bmesh/intern/bmesh_edgeloop.c
+++ b/source/blender/bmesh/intern/bmesh_edgeloop.c
@@ -682,12 +682,12 @@ void BM_edgeloop_expand(BMesh *UNUSED(bm), BMEdgeLoopStore *el_store, int el_sto
 			LinkData *node_curr_init = node_curr;
 			LinkData *node_curr_copy;
 			int i = 0;
-			LISTBASE_CIRCULAR_FORWARD_BEGIN (&el_store->verts, node_curr, node_curr_init) {
+			BLI_LISTBASE_CIRCULAR_FORWARD_BEGIN (&el_store->verts, node_curr, node_curr_init) {
 				if (i++ < step) {
 					break;
 				}
 			}
-			LISTBASE_CIRCULAR_FORWARD_END (&el_store->verts, node_curr, node_curr_init);
+			BLI_LISTBASE_CIRCULAR_FORWARD_END (&el_store->verts, node_curr, node_curr_init);
 
 			node_curr_copy = MEM_dupallocN(node_curr);
 			BLI_insertlinkafter(&el_store->verts, node_curr, node_curr_copy);
diff --git a/source/blender/bmesh/operators/bmo_bridge.c b/source/blender/bmesh/operators/bmo_bridge.c
index 9e9cd0d..e441747 100644
--- a/source/blender/bmesh/operators/bmo_bridge.c
+++ b/source/blender/bmesh/operators/bmo_bridge.c
@@ -119,7 +119,7 @@ static void bm_bridge_best_rotation(struct BMEdgeLoopStore *el_store_a, struct B
 	}
 
 	if (el_b_best) {
-		BLI_rotatelist_first(lb_b, el_b_best);
+		BLI_listbase_rotate_first(lb_b, el_b_best);
 	}
 }
 
@@ -272,7 +272,7 @@ static void bridge_loop_pair(BMesh *bm,
 			const int len_b = BM_edgeloop_length_get(el_store_b);
 			ListBase *lb_b = BM_edgeloop_verts_get(el_store_b);
 			LinkData *el_b = BLI_rfindlink(lb_b, mod_i(twist_offset, len_b));
-			BLI_rotatelist_first(lb_b, el_b);
+			BLI_listbase_rotate_first(lb_b, el_b);
 		}
 	}
 
diff --git a/source/blender/bmesh/operators/bmo_subdivide_edgering.c b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
index e13a9df..8bb4722 100644
--- a/source/blender/bmesh/operators/bmo_subdivide_edgering.c
+++ b/source/blender/bmesh/operators/bmo_subdivide_edgering.c
@@ -920,13 +920,13 @@ static void bm_edgering_pair_order(BMesh *bm,
 		}
 		BLI_assert(node != NULL);
 
-		BLI_rotatelist_first(lb_b, node);
+		BLI_listbase_rotate_first(lb_b, node);
 
 		/* now check we are winding the same way */
 		if (bm_edgering_pair_order_is_flipped(bm, el_store_a, el_store_b)) {
 			BM_edgeloop_flip(bm, el_store_b);
 			/* re-ensure the first node */
-			BLI_rotatelist_first(lb_b, node);
+			BLI_listbase_rotate_first(lb_b, node);
 		}
 
 		/* sanity checks that we are aligned & winding now */
diff --git a/source/blender/editors/animation/anim_markers.c b/source/blender/editors/animation/anim_markers.c
index 08d30b2..a133bc49 100644
--- a/source/blender/editors/animation/anim_markers.c
+++ b/source/blender/editors/animation/anim_markers.c
@@ -1012,14 +1012,14 @@ static void select_timeline_marker_frame(ListBase *markers, int frame, bool exte
 		}
 	}
 
-	LISTBASE_CIRCULAR_FORWARD_BEGIN (markers, marker, marker_first) {
+	BLI_LISTBASE_CIRCULAR_FORWARD_BEGIN (markers, marker, marker_first) {
 		/* this way a not-extend select will allways give 1 selected marker */
 		if (marker->frame == frame) {
 			marker->flag ^= SELECT;
 			break;
 		}
 	}
-	LISTBASE_CIRCULAR_FORWARD_END (markers, marker, marker_first);
+	BLI_LISTBASE_CIRCULAR_FORWARD_END (markers, marker, marker_first);
 }
 
 static int ed_marker_select(bContext *C, const wmEvent *event, bool extend, bool camera)
diff --git a/source/blender/editors/mesh/editmesh_tools.c b/source/blender/editors/mesh/editmesh_tools.c
index 2ee5555..3609abf 100644
--- a/source/blender/editors/mesh/editmesh_tools.c
+++ b/source/blender/editors/mesh/editmesh_tools.c
@@ -3047,7 +3047,7 @@ static void edbm_fill_grid_prepare(BMesh *bm, int offset, int *r_span, bool span
 		}
 
 		/* set this vertex first */
-		BLI_rotatelist_first(verts, v_act_link);
+		BLI_listbase_rotate_first(verts, v_act_link);
 		BM_edgeloop_edges_get(el_store, edges);
 
 
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c
index 4e61910..e2ebe58 100644
--- a/source/blender/editors/object/object_transform.c
+++ b/source/blender/editors/object/object_transform.c
@@ -784,7 +784,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
 	}
 
 	if (ctx_ob_act) {
-		BLI_rotatelist_first(&ctx_data_list, (LinkData *)ctx_ob_act);
+		BLI_listbase_rotate_first(&ctx_data_list, (LinkData *)ctx_ob_act);
 	}
 
 	for (tob = bmain->object.first; tob; tob = tob->id.next) {




More information about the Bf-blender-cvs mailing list