changes to BLI_buffer
- assert if BLI_buffer_at() is called with an out of bounds value. - add BLI_buffer_resize_data() macro which resizes and returns a pointer to the new array. - warn if missing call to BLI_buffer_free().
This commit is contained in:
@@ -70,7 +70,8 @@ void BLI_buffer_resize(BLI_Buffer *buffer, int new_count)
|
||||
buffer->count = new_count;
|
||||
}
|
||||
|
||||
void BLI_buffer_free(BLI_Buffer *buffer)
|
||||
/* callers use BLI_buffer_free */
|
||||
void _bli_buffer_free(BLI_Buffer *buffer)
|
||||
{
|
||||
if ((buffer->flag & BLI_BUFFER_USE_STATIC) == 0) {
|
||||
if (buffer->data) {
|
||||
|
||||
Reference in New Issue
Block a user