BLI_buffer: empty macro
This commit is contained in:
@@ -883,7 +883,8 @@ static void pbvh_bmesh_collapse_edge(
|
||||
/* Note: this could be done with BM_vert_splice(), but that
|
||||
* requires handling other issues like duplicate edges, so doesn't
|
||||
* really buy anything. */
|
||||
deleted_faces->count = 0;
|
||||
BLI_buffer_empty(deleted_faces);
|
||||
|
||||
BM_ITER_ELEM (f, &bm_iter, v_del, BM_FACES_OF_VERT) {
|
||||
BMVert *v_tri[3];
|
||||
BMFace *existing_face;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user