Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-10-10 12:10:13 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-10-10 12:10:13 +0400
commit642c8243e7a5425de949892ab7a43a3e2077e122 (patch)
tree33e00e2f8c647970f0693a353763ae70eaa66ef0 /source/blender/blenlib
parentc6d8ac9fe236c0136a1d9aebbdd0ba080617a725 (diff)
BLI_buffer: empty macro
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_buffer.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_buffer.h b/source/blender/blenlib/BLI_buffer.h
index 9c4b4b00b24..700abcad9bd 100644
--- a/source/blender/blenlib/BLI_buffer.h
+++ b/source/blender/blenlib/BLI_buffer.h
@@ -88,13 +88,15 @@ enum {
#define BLI_buffer_resize_data(buffer_, type_, new_count_) ( \
(BLI_buffer_resize(buffer_, new_count_), new_count_ ? BLI_buffer_array(buffer_, type_) : NULL))
-
-
#define BLI_buffer_append(buffer_, type_, val_) ( \
BLI_buffer_resize(buffer_, (buffer_)->count + 1), \
(BLI_buffer_at(buffer_, type_, (buffer_)->count - 1) = val_) \
)
+#define BLI_buffer_empty(buffer_) { \
+ (buffer_)->count = 0; \
+} (void)0
+
/* Never decreases the amount of memory allocated */
void BLI_buffer_resize(BLI_Buffer *buffer, int new_count);