diff options
author | Chris Robinson <[email protected]> | 2011-10-06 06:39:13 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-10-06 06:39:13 -0700 |
commit | 81133769def858c663718dc3e676d288594e0d66 (patch) | |
tree | 47ece23d7143a64c4c08fe109335a59a71fc7077 /OpenAL32 | |
parent | a7d3779dfafbc7b5011ea7d1b252d94daed969f6 (diff) |
Return the key's value from the map when it's removed
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/Include/alMain.h | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenAL32/Include/alMain.h b/OpenAL32/Include/alMain.h index a6ef8bb3..8a9e8d59 100644 --- a/OpenAL32/Include/alMain.h +++ b/OpenAL32/Include/alMain.h @@ -427,9 +427,8 @@ extern UIntMap TlsDestructor; void InitUIntMap(UIntMap *map, ALsizei limit); void ResetUIntMap(UIntMap *map); ALenum InsertUIntMapEntry(UIntMap *map, ALuint key, ALvoid *value); -void RemoveUIntMapKey(UIntMap *map, ALuint key); +ALvoid *RemoveUIntMapKey(UIntMap *map, ALuint key); ALvoid *LookupUIntMapKey(UIntMap *map, ALuint key); -ALvoid *PopUIntMapValue(UIntMap *map, ALuint key); static __inline void LockUIntMapRead(UIntMap *map) { ReadLock(&map->lock); } @@ -703,9 +702,9 @@ struct ALCdevice_struct #define LookupBuffer(m, k) ((struct ALbuffer*)LookupUIntMapKey(&(m)->BufferMap, (k))) #define LookupEffect(m, k) ((struct ALeffect*)LookupUIntMapKey(&(m)->EffectMap, (k))) #define LookupFilter(m, k) ((struct ALfilter*)LookupUIntMapKey(&(m)->FilterMap, (k))) -#define RemoveBuffer(m, k) ((struct ALbuffer*)PopUIntMapValue(&(m)->BufferMap, (k))) -#define RemoveEffect(m, k) ((struct ALeffect*)PopUIntMapValue(&(m)->EffectMap, (k))) -#define RemoveFilter(m, k) ((struct ALfilter*)PopUIntMapValue(&(m)->FilterMap, (k))) +#define RemoveBuffer(m, k) ((struct ALbuffer*)RemoveUIntMapKey(&(m)->BufferMap, (k))) +#define RemoveEffect(m, k) ((struct ALeffect*)RemoveUIntMapKey(&(m)->EffectMap, (k))) +#define RemoveFilter(m, k) ((struct ALfilter*)RemoveUIntMapKey(&(m)->FilterMap, (k))) struct ALCcontext_struct @@ -745,8 +744,8 @@ struct ALCcontext_struct #define LookupSource(m, k) ((struct ALsource*)LookupUIntMapKey(&(m)->SourceMap, (k))) #define LookupEffectSlot(m, k) ((struct ALeffectslot*)LookupUIntMapKey(&(m)->EffectSlotMap, (k))) -#define RemoveSource(m, k) ((struct ALsource*)PopUIntMapValue(&(m)->SourceMap, (k))) -#define RemoveEffectSlot(m, k) ((struct ALeffectslot*)PopUIntMapValue(&(m)->EffectSlotMap, (k))) +#define RemoveSource(m, k) ((struct ALsource*)RemoveUIntMapKey(&(m)->SourceMap, (k))) +#define RemoveEffectSlot(m, k) ((struct ALeffectslot*)RemoveUIntMapKey(&(m)->EffectSlotMap, (k))) ALCcontext *GetContextRef(void); |