diff options
author | Chris Robinson <[email protected]> | 2014-04-19 02:38:32 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-19 03:11:23 -0700 |
commit | 1d266aa8347fadfb0db34ae27df7b728c0ab2171 (patch) | |
tree | f194a04fa74b3fe9deb0b619c7b7d3eab21602dd /Alc/backends | |
parent | 59fc9aac0ee41518dba0cbd2f1518decffeaa480 (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.h | 2 |
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, \ |