[Bf-blender-cvs] [974d2dc] master: BLI_array: avoid accidental assignment to BLI_array_count

Campbell Barton noreply at git.blender.org
Thu Jun 26 16:36:16 CEST 2014


Commit: 974d2dc54aaed4f210ecd603737170187f9a0151
Author: Campbell Barton
Date:   Fri Jun 27 00:31:50 2014 +1000
https://developer.blender.org/rB974d2dc54aaed4f210ecd603737170187f9a0151

BLI_array: avoid accidental assignment to BLI_array_count

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

M	source/blender/blenlib/BLI_array.h

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

diff --git a/source/blender/blenlib/BLI_array.h b/source/blender/blenlib/BLI_array.h
index 4e2cfe0..f8e2362 100644
--- a/source/blender/blenlib/BLI_array.h
+++ b/source/blender/blenlib/BLI_array.h
@@ -78,7 +78,7 @@ void _bli_array_grow_func(void **arr_p, const void *arr_static,
 	char  _##arr##_static[maxstatic * sizeof(*(arr))]
 
 /* this returns the logical size of the array, not including buffering. */
-#define BLI_array_count(arr) _##arr##_count
+#define BLI_array_count(arr) ((void)0, _##arr##_count)
 
 /* Grow the array by a fixed number of items.
  *




More information about the Bf-blender-cvs mailing list