Rename DELETE to DELETE_OBJ

Because Windows.
This commit is contained in:
Chris Robinson
2013-05-21 23:42:40 -07:00
parent 604726c639
commit 0a07ed14c2
3 changed files with 8 additions and 9 deletions
+2 -2
View File
@@ -1779,7 +1779,7 @@ static ALCvoid FreeDevice(ALCdevice *device)
{
ALeffectState *state = device->DefaultSlot->EffectState;
device->DefaultSlot = NULL;
DELETE(state);
DELETE_OBJ(state);
}
if(device->BufferMap.size > 0)
@@ -2902,7 +2902,7 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
{
ALeffectState *state = device->DefaultSlot->EffectState;
device->DefaultSlot = NULL;
DELETE(state);
DELETE_OBJ(state);
ERR("Failed to initialize the default effect\n");
}
}
+1 -2
View File
@@ -70,8 +70,7 @@ static const union {
#define SET_VTABLE1(T1, obj) ((obj)->vtbl = &(T1##_vtable))
#define SET_VTABLE2(T1, T2, obj) SET_VTABLE1(T1##_##T2, STATIC_CAST(T2, (obj)))
#define NEW(T) (T##Factory_getFactory()->create())
#define DELETE(obj) ((obj)->vtbl->getCreator()->vtbl->destroy((obj)))
#define DELETE_OBJ(obj) ((obj)->vtbl->getCreator()->vtbl->destroy((obj)))
#ifdef _WIN32
+5 -5
View File
@@ -74,7 +74,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo
if(err != AL_NO_ERROR)
{
FreeThunkEntry(slot->id);
DELETE(slot->EffectState);
DELETE_OBJ(slot->EffectState);
al_free(slot);
alDeleteAuxiliaryEffectSlots(cur, effectslots);
@@ -123,7 +123,7 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint *
FreeThunkEntry(slot->id);
RemoveEffectSlotArray(Context, slot);
DELETE(slot->EffectState);
DELETE_OBJ(slot->EffectState);
memset(slot, 0, sizeof(*slot));
al_free(slot);
@@ -596,7 +596,7 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e
{
ALCdevice_Unlock(Device);
RestoreFPUMode(&oldMode);
DELETE(State);
DELETE_OBJ(State);
return AL_OUT_OF_MEMORY;
}
@@ -615,7 +615,7 @@ ALenum InitializeEffect(ALCdevice *Device, ALeffectslot *EffectSlot, ALeffect *e
RestoreFPUMode(&oldMode);
DELETE(State);
DELETE_OBJ(State);
State = NULL;
}
else
@@ -665,7 +665,7 @@ ALvoid ReleaseALAuxiliaryEffectSlots(ALCcontext *Context)
ALeffectslot *temp = Context->EffectSlotMap.array[pos].value;
Context->EffectSlotMap.array[pos].value = NULL;
DELETE(temp->EffectState);
DELETE_OBJ(temp->EffectState);
FreeThunkEntry(temp->id);
memset(temp, 0, sizeof(ALeffectslot));