aboutsummaryrefslogtreecommitdiffstats
path: root/examples/allatency.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-04-22 11:24:39 -0700
committerChris Robinson <[email protected]>2022-04-22 11:24:39 -0700
commite7a2c0af762e19c336447e2034ee7ed81f111009 (patch)
tree559fefdaf0b59743c8cab19d0cdd0f355247c3b2 /examples/allatency.c
parent1050428d3d463616c622d3f95effa313bf334249 (diff)
Define FUNCTION_CAST in a common header
Diffstat (limited to 'examples/allatency.c')
-rw-r--r--examples/allatency.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/examples/allatency.c b/examples/allatency.c
index 3b141ac0..ab4a4ebc 100644
--- a/examples/allatency.c
+++ b/examples/allatency.c
@@ -51,17 +51,6 @@ static LPALGETSOURCEI64SOFT alGetSourcei64SOFT;
static LPALGETSOURCE3I64SOFT alGetSource3i64SOFT;
static LPALGETSOURCEI64VSOFT alGetSourcei64vSOFT;
-/* C doesn't allow casting between function and non-function pointer types, so
- * with C99 we need to use a union to reinterpret the pointer type. Pre-C99
- * still needs to use a normal cast and live with the warning (C++ is fine with
- * a regular reinterpret_cast).
- */
-#if __STDC_VERSION__ >= 199901L
-#define FUNCTION_CAST(T, ptr) (union{void *p; T f;}){ptr}.f
-#else
-#define FUNCTION_CAST(T, ptr) (T)(ptr)
-#endif
-
/* LoadBuffer loads the named audio file into an OpenAL buffer object, and
* returns the new buffer ID.
*/