Commit Graph

9 Commits

Author SHA1 Message Date
2af905391d cleanup: doxy comments 2015-02-14 08:00:41 +11:00
642c8243e7 BLI_buffer: empty macro 2014-10-10 10:10:13 +02:00
8beb565c59 code cleanup: headers - doxy comments. 2013-09-12 03:02:50 +00:00
00b39c4e5b code cleanup: more confusion with 0/NULL/false 2013-08-07 03:55:21 +00:00
e3f6875df0 fix for error in BLI_buffer_declare_static(), the stack variable wasn't the right size, from original commit 53440.
Caused UV stretch display to fail.
2013-07-26 15:26:51 +00:00
1b994dbeb0 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().
2013-03-16 00:12:14 +00:00
0d95dde79b add assert to BLI_buffer_at if a type is given different to 'elem_size' 2013-01-02 05:19:55 +00:00
9190c493c1 extend BLI_buffer
- add option to calloc or not, existing code wasnt consistent here, would calloc on first alloc but not on realloc, also - the static memory was never zero'd.
  use flag BLI_BUFFER_USE_CALLOC to ensure all new memory is zero'd (static/alloc/realloc's).

- add BLI_buffer_declare_static / BLI_buffer_declare so its possible to have a buffer that never uses static memory.
2013-01-02 05:00:02 +00:00
2c9d22fe31 Add BLI_buffer, an alternative to BLI_array
BLI_buffer is a dynamic homogeneous array similar to BLI_array, but it
allocates a structure that can be passed around making it possible to
resize the array outside the function it was declared in.
2012-12-30 18:28:10 +00:00