aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/backends
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/backends
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/backends')
-rw-r--r--Alc/backends/base.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Alc/backends/base.h b/Alc/backends/base.h
index 905c3ea4..d18ca400 100644
--- a/Alc/backends/base.h
+++ b/Alc/backends/base.h
@@ -61,7 +61,7 @@ DECLARE_THUNK(T, ALCbackend, ALint64, getLatency) \
DECLARE_THUNK(T, ALCbackend, void, lock) \
DECLARE_THUNK(T, ALCbackend, void, unlock) \
static void T##_ALCbackend_Delete(void *ptr) \
-{ T##_Delete(STATIC_UPCAST(T, ALCbackend, ptr)); } \
+{ T##_Delete(STATIC_UPCAST(T, ALCbackend, (ALCbackend*)ptr)); } \
\
DECLARE_ALCBACKEND_VTABLE(T) = { \
T##_ALCbackend_Destruct, \