mirror of
https://github.com/mauiaaron/apple2.git
synced 2024-12-26 00:31:44 +00:00
Refactor: macro should be capitalized
This commit is contained in:
parent
77e8f88edc
commit
8621b1ac53
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user