aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/midi
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-19 02:38:32 -0700
committerChris Robinson <[email protected]>2014-04-19 03:11:23 -0700
commit1d266aa8347fadfb0db34ae27df7b728c0ab2171 (patch)
treef194a04fa74b3fe9deb0b619c7b7d3eab21602dd /Alc/midi
parent59fc9aac0ee41518dba0cbd2f1518decffeaa480 (diff)
Add a GCC-specific STATIC_UPCAST macro that checks the object type
The check is compile time, and is functionally identical to the old/alternate version.
Diffstat (limited to 'Alc/midi')
-rw-r--r--Alc/midi/base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/midi/base.h b/Alc/midi/base.h
index 75332006..42a4c279 100644
--- a/Alc/midi/base.h
+++ b/Alc/midi/base.h
@@ -99,7 +99,7 @@ DECLARE_THUNK(T, MidiSynth, void, reset) \
DECLARE_THUNK1(T, MidiSynth, void, update, ALCdevice*) \
DECLARE_THUNK2(T, MidiSynth, void, process, ALuint, ALfloatBUFFERSIZE*restrict) \
static void T##_MidiSynth_Delete(void *ptr) \
-{ T##_Delete(STATIC_UPCAST(T, MidiSynth, ptr)); } \
+{ T##_Delete(STATIC_UPCAST(T, MidiSynth, (MidiSynth*)ptr)); } \
\
static const struct MidiSynthVtable T##_MidiSynth_vtable = { \
T##_MidiSynth_Destruct, \