From d0a64fe191aabe085cabe1737c44ff6a47a3d4d8 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 6 Jul 2014 03:27:39 -0700 Subject: Don't require pre-declaring vector types --- OpenAL32/alAuxEffectSlot.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'OpenAL32/alAuxEffectSlot.c') diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 9f554cb0..ca1e1237 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -35,7 +35,7 @@ extern inline struct ALeffectslot *LookupEffectSlot(ALCcontext *context, ALuint id); extern inline struct ALeffectslot *RemoveEffectSlot(ALCcontext *context, ALuint id); -static ALenum AddEffectSlotArray(ALCcontext *Context, const_vector_ALeffectslotPtr slots); +static ALenum AddEffectSlotArray(ALCcontext *Context, ALeffectslot **start, ALsizei count); static void RemoveEffectSlotArray(ALCcontext *Context, const ALeffectslot *slot); @@ -52,7 +52,7 @@ static inline ALeffectStateFactory *getFactoryByType(ALenum type) AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots) { ALCcontext *context; - vector_ALeffectslotPtr slotvec; + VECTOR(ALeffectslot*) slotvec; ALsizei cur; ALenum err; @@ -94,7 +94,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo effectslots[cur] = slot->id; } - err = AddEffectSlotArray(context, slotvec); + err = AddEffectSlotArray(context, VECTOR_ITER_BEGIN(slotvec), n); if(err != AL_NO_ERROR) { alDeleteAuxiliaryEffectSlots(cur, effectslots); @@ -385,13 +385,12 @@ done: } -static ALenum AddEffectSlotArray(ALCcontext *context, const_vector_ALeffectslotPtr slots) +static ALenum AddEffectSlotArray(ALCcontext *context, ALeffectslot **start, ALsizei count) { ALenum err = AL_NO_ERROR; LockContext(context); - if(!VECTOR_INSERT(context->ActiveAuxSlots, VECTOR_ITER_END(context->ActiveAuxSlots), - VECTOR_ITER_BEGIN(slots), VECTOR_ITER_END(slots))) + if(!VECTOR_INSERT(context->ActiveAuxSlots, VECTOR_ITER_END(context->ActiveAuxSlots), start, start+count)) err = AL_OUT_OF_MEMORY; UnlockContext(context); -- cgit v1.2.3