diff options
author | Chris Robinson <[email protected]> | 2014-07-06 05:00:05 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-07-06 05:00:05 -0700 |
commit | f809d3c81aa3c9d868a207e291d19e406ad7ee61 (patch) | |
tree | a77016fbe087036a111756652fe0b705259b2e12 /Alc/vector.h | |
parent | d0a64fe191aabe085cabe1737c44ff6a47a3d4d8 (diff) |
Allow ALsoundfont_deleteSoundfont to handle multiple buffers
Diffstat (limited to 'Alc/vector.h')
-rw-r--r-- | Alc/vector.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Alc/vector.h b/Alc/vector.h index 944cccc2..cc0c84fb 100644 --- a/Alc/vector.h +++ b/Alc/vector.h @@ -74,4 +74,14 @@ ALboolean vector_insert(void *ptr, size_t base_size, size_t obj_size, void *ins_ _f(_iter); \ } while(0) +#define VECTOR_FIND_IF(_i, _t, _x, _f) do { \ + _t *_end = VECTOR_ITER_END((_x)); \ + (_i) = VECTOR_ITER_BEGIN((_x)); \ + for(;(_i) != _end;++(_i)) \ + { \ + if(_f(_i)) \ + break; \ + } \ +} while(0) + #endif /* AL_VECTOR_H */ |