[Bf-blender-cvs] [7e0932f] soc-2013-paint: BLI_array: avoid mixing terms count/length

Campbell Barton noreply at git.blender.org
Sat Jul 12 12:44:56 CEST 2014


Commit: 7e0932f86aa3d145c2039626a50b072b2dd43151
Author: Campbell Barton
Date:   Fri Jul 11 15:30:42 2014 +1000
https://developer.blender.org/rB7e0932f86aa3d145c2039626a50b072b2dd43151

BLI_array: avoid mixing terms count/length

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

M	source/blender/blenlib/BLI_array.h
M	source/blender/bmesh/operators/bmo_edgenet.c

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

diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index f8e2362..b2f0bd5 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -144,7 +144,7 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
 
 /* set the count of the array, doesn't actually increase the allocated array
  * size.  don't use this unless you know what you're doing. */
-#define BLI_array_length_set(arr, count)                                      \
+#define BLI_array_count_set(arr, count)                                      \
 	{ _##arr##_count = (count); }(void)0
 
 /* only to prevent unused warnings */
diff --git a/source/blender/bmesh/operators/bmo_edgenet.c b/source/blender/bmesh/operators/bmo_edgenet.c
index 0c5de59..4423123 100644
--- a/source/blender/bmesh/operators/bmo_edgenet.c
+++ b/source/blender/bmesh/operators/bmo_edgenet.c
@@ -179,11 +179,11 @@ void bmo_edgenet_prepare_exec(BMesh *bm, BMOperator *op)
 
 		if (!count) {
 			edges1 = edges;
-			BLI_array_length_set(edges1, BLI_array_count(edges));
+			BLI_array_count_set(edges1, BLI_array_count(edges));
 		}
 		else {
 			edges2 = edges;
-			BLI_array_length_set(edges2, BLI_array_count(edges));
+			BLI_array_count_set(edges2, BLI_array_count(edges));
 		}
 
 		BLI_array_empty(edges);




More information about the Bf-blender-cvs mailing list