Chris Robinson
585b0cf3be
Remove the DEF_ALIGN macro
2019-06-06 00:37:00 -07:00
Chris Robinson
190de1452e
Remove the unused vector macros
2018-11-18 23:37:56 -08:00
Chris Robinson
4dc8f44d00
Move the alignment-aware allocator and vector to headers
2018-11-18 01:33:26 -08:00
Chris Robinson
8a8ab68f1c
Add a more C++-friendly VECTOR_RESIZE
2018-10-29 10:10:37 -07:00
Chris Robinson
6dd1643a70
Avoid dereferencing a NULL pointer
...
Even though it's taking the address of a member, it's still technically a
derefernce and thus undefined behavior. sizeof doesn't "execute" the
expression, so derefering in it instead is fine.
2017-12-31 23:19:41 -08:00
Chris Robinson
497d078f50
Remove a couple unused macros
2017-04-01 03:04:15 -07:00
Chris Robinson
13d7d6fe95
Don't rely on sizeof being the offset to a struct's unsized array
2017-04-01 03:00:24 -07:00
Chris Robinson
bd054632e0
Remove an unneeded typedef
2016-08-21 23:59:11 -07:00
Chris Robinson
5e11a738c6
Combine VECTOR_RESIZE and VECTOR_RESERVE
2016-07-26 12:02:03 -07:00
Chris Robinson
70a105c22c
Remove unnecessary VECTOR_INSERT
2016-05-30 00:05:10 -07:00
Chris Robinson
2e7ec3979a
Avoid using realloc in a number of places
2016-05-21 03:27:51 -07:00
Chris Robinson
f4ff5fc106
Shorten VECTOR_ITER_ macros to VECTOR_
2016-04-15 12:22:54 -07:00
Chris Robinson
a4c378dd00
Enumerate and list HRTFs per-device
2015-10-06 00:23:11 -07:00
Chris Robinson
d82d6c701d
Use size_t for the vector size and capacity
2014-09-30 21:47:22 -07:00
Chris Robinson
a3c236598a
Simplify some vector size range checks
2014-08-10 10:52:08 -07:00
Chris Robinson
936a79da7d
Give NULL for null-vector iterators
2014-08-10 09:12:08 -07:00
Chris Robinson
94013216b6
Pass pointer-to-vector types as char* instead of void*
...
C aliasing rules only allow char* to alias an otherwise-incompatible type,
rather than void*.
2014-08-10 08:46:55 -07:00
Chris Robinson
c5af088b5f
Access the result macro parameter only once
2014-07-06 22:11:29 -07:00
Chris Robinson
f809d3c81a
Allow ALsoundfont_deleteSoundfont to handle multiple buffers
2014-07-06 05:00:05 -07:00
Chris Robinson
d0a64fe191
Don't require pre-declaring vector types
2014-07-06 03:27:39 -07:00
Chris Robinson
8b1b52a687
Remove an unnecessary cast
2014-07-01 22:27:53 -07:00
Chris Robinson
2660ecfd4a
Revert e9aee578a797c694655538cd0a00ad6c0bf6d5dc
...
The vector iterator needs to be the start of the Data array even if the vector
itself is NULL, or else insertion can have a negative insert position.
2014-05-02 11:48:55 -07:00
Chris Robinson
f150676873
Add a helper VECTOR_FOR_EACH macro
2014-04-30 12:30:02 -07:00
Chris Robinson
e9aee578a7
Avoid dereferencing a NULL pointer
2014-04-21 23:10:09 -07:00
Chris Robinson
7bc08bb08c
Ensure VECTOR_ITER_BEGIN gives a pointer-to-type instead of an array-of-type
2014-04-14 00:58:45 -07:00
Chris Robinson
219a0e6352
Add a GCC-specific VECTOR_INSERT
...
This version is capable of doing a compile-time type checks, to ensure the
objects being inserted are compatible with the vector data type. It should
otherwise be functionally identical.
2014-04-13 20:26:04 -07:00
Chris Robinson
0ef87227c1
Pass in the vector insertion point as a pointer
2014-04-13 18:42:41 -07:00
Chris Robinson
cce9609b9e
Avoid referencing the start iterator twice for vector insertion
2014-04-13 17:06:18 -07:00
Chris Robinson
90ae4b7c0f
Add a VECTOR_INSERT method to insert a range of elements at once
2014-04-09 22:50:28 -07:00
Chris Robinson
482fb37b68
Recognize NULL as an empty vector/string
2014-04-03 11:13:12 -07:00
Chris Robinson
570eb4e1a7
Don't pass the vector's capacity as a parameter to vector_reserve
2014-03-31 06:13:56 -07:00
Chris Robinson
af8fda8a4a
Add an al_string type and use it for the device lists
2014-03-28 05:44:19 -07:00
Chris Robinson
d11d061b2c
Don't have VECTOR_INIT "return" anything
2014-03-27 17:21:23 -07:00
Chris Robinson
8c33b4d742
Increase the vector reserve as needed when pushing in new items
2014-03-21 16:35:38 -07:00
Chris Robinson
983fa4630a
Rename the vector's Max field to Capacity
2014-03-21 14:03:26 -07:00
Chris Robinson
40a0692a1c
Use vectors for the GenModList
2014-03-21 02:41:46 -07:00
Chris Robinson
ff63188cc2
Add a generic vector interface and use it for the active effect slots
2014-03-21 01:23:01 -07:00