aboutsummaryrefslogtreecommitdiffstats
path: root/router/al.cpp
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-12 16:12:15 -0800
committerChris Robinson <[email protected]>2023-12-12 16:12:15 -0800
commitbdd54018f3dd63a9591fae8b7a21a71e8adc3ddb (patch)
treee1b9305f976c37e15af078a2a4ceb4c88156a6f1 /router/al.cpp
parent60aa22f20d63a3da9f06b9398a2a8656ebbd0342 (diff)
Remove void from empty parameter lists
Also convert some functions to trailing return types and remove (void) casts.
Diffstat (limited to 'router/al.cpp')
-rw-r--r--router/al.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/router/al.cpp b/router/al.cpp
index 6ed8a626..57c8d179 100644
--- a/router/al.cpp
+++ b/router/al.cpp
@@ -1,37 +1,42 @@
#include "config.h"
-#include <stddef.h>
+#include <cstddef>
#include "AL/al.h"
#include "router.h"
-#define DECL_THUNK1(R,n,T1) AL_API R AL_APIENTRY n(T1 a) noexcept \
+#define DECL_THUNK1(R,n,T1) \
+AL_API auto AL_APIENTRY n(T1 a) noexcept -> R \
{ \
DriverIface *iface = GetThreadDriver(); \
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
return iface->n(a); \
}
-#define DECL_THUNK2(R,n,T1,T2) AL_API R AL_APIENTRY n(T1 a, T2 b) noexcept \
+#define DECL_THUNK2(R,n,T1,T2) \
+AL_API auto AL_APIENTRY n(T1 a, T2 b) noexcept -> R \
{ \
DriverIface *iface = GetThreadDriver(); \
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
return iface->n(a, b); \
}
-#define DECL_THUNK3(R,n,T1,T2,T3) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c) noexcept \
+#define DECL_THUNK3(R,n,T1,T2,T3) \
+AL_API auto AL_APIENTRY n(T1 a, T2 b, T3 c) noexcept -> R \
{ \
DriverIface *iface = GetThreadDriver(); \
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
return iface->n(a, b, c); \
}
-#define DECL_THUNK4(R,n,T1,T2,T3,T4) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d) noexcept \
+#define DECL_THUNK4(R,n,T1,T2,T3,T4) \
+AL_API auto AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d) noexcept -> R \
{ \
DriverIface *iface = GetThreadDriver(); \
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
return iface->n(a, b, c, d); \
}
-#define DECL_THUNK5(R,n,T1,T2,T3,T4,T5) AL_API R AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d, T5 e) noexcept \
+#define DECL_THUNK5(R,n,T1,T2,T3,T4,T5) \
+AL_API auto AL_APIENTRY n(T1 a, T2 b, T3 c, T4 d, T5 e) noexcept -> R \
{ \
DriverIface *iface = GetThreadDriver(); \
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire); \
@@ -42,7 +47,7 @@
/* Ugly hack for some apps calling alGetError without a current context, and
* expecting it to be AL_NO_ERROR.
*/
-AL_API ALenum AL_APIENTRY alGetError(void) noexcept
+AL_API auto AL_APIENTRY alGetError() noexcept -> ALenum
{
DriverIface *iface = GetThreadDriver();
if(!iface) iface = CurrentCtxDriver.load(std::memory_order_acquire);