Refactor: macro should be capitalized

This commit is contained in:
Aaron Culliney 2014-09-06 19:47:59 -07:00
parent 77e8f88edc
commit 8621b1ac53
5 changed files with 12 additions and 12 deletions

View File

@ -1644,7 +1644,7 @@ void MB_Destroy()
for(int i=0; i<NUM_VOICES; i++) for(int i=0; i<NUM_VOICES; i++)
{ {
#ifdef APPLE2IX #ifdef APPLE2IX
Free(ppAYVoiceBuffer[i]); FREE(ppAYVoiceBuffer[i]);
#else #else
delete [] ppAYVoiceBuffer[i]; delete [] ppAYVoiceBuffer[i];
#endif #endif

View File

@ -152,7 +152,7 @@ long SoundSystemCreate(const char *sound_device, SoundSystemStruct **sound_struc
// ERRQUIT // ERRQUIT
if (*sound_struct) if (*sound_struct)
{ {
Free(*sound_struct); FREE(*sound_struct);
} }
return -1; return -1;
@ -166,7 +166,7 @@ long SoundSystemDestroy(SoundSystemStruct **sound_struct)
ALCcontext *ctx = (ALCcontext*) (*sound_struct)->implementation_specific; ALCcontext *ctx = (ALCcontext*) (*sound_struct)->implementation_specific;
assert(ctx != NULL); assert(ctx != NULL);
(*sound_struct)->implementation_specific = NULL; (*sound_struct)->implementation_specific = NULL;
Free(*sound_struct); FREE(*sound_struct);
CloseAL(); CloseAL();
@ -234,7 +234,7 @@ static void DeleteVoice(ALVoice *voice)
if (voice->data) if (voice->data)
{ {
Free(voice->data); FREE(voice->data);
} }
ALPlayBuf *node = NULL; ALPlayBuf *node = NULL;
@ -829,9 +829,9 @@ static long OpenALDestroySoundBuffer(ALSoundBufferStruct **soundbuf_struct)
ALVoices *vnode = NULL; ALVoices *vnode = NULL;
HASH_FIND_INT(voices, &source, vnode); HASH_FIND_INT(voices, &source, vnode);
HASH_DEL(voices, vnode); HASH_DEL(voices, vnode);
Free(vnode); FREE(vnode);
Free(*soundbuf_struct); FREE(*soundbuf_struct);
return 0; return 0;
} }

View File

@ -596,10 +596,10 @@ bool DSInit()
char **ptr = sound_devices; char **ptr = sound_devices;
while (*ptr) while (*ptr)
{ {
Free(*ptr); FREE(*ptr);
++ptr; ++ptr;
} }
Free(sound_devices); FREE(sound_devices);
sound_devices = NULL; sound_devices = NULL;
} }
num_sound_devices = SoundSystemEnumerate(&sound_devices, MAX_SOUND_DEVICES); num_sound_devices = SoundSystemEnumerate(&sound_devices, MAX_SOUND_DEVICES);

View File

@ -22,7 +22,7 @@
#define MAX_SAMPLES (8*1024) #define MAX_SAMPLES (8*1024)
#if defined(APPLE2IX) #if defined(APPLE2IX)
#define SAFE_RELEASE(p) Free(p) #define SAFE_RELEASE(p) FREE(p)
#else #else
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } } #define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
#endif #endif

View File

@ -128,10 +128,10 @@ extern FILE *error_log;
_LOG(__VA_ARGS__); \ _LOG(__VA_ARGS__); \
} while(0); } while(0);
#define Free(X) \ #define FREE(x) \
do { \ do { \
free(X); \ free((x)); \
X=NULL; \ (x) = NULL; \
} while (0); } while (0);
#endif // whole file #endif // whole file