aboutsummaryrefslogtreecommitdiffstats
path: root/alc/export_list.h
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2023-12-10 11:34:04 -0800
committerChris Robinson <[email protected]>2023-12-10 11:34:04 -0800
commit073d79c2047143e70bb199077fe3c8dbafe0a606 (patch)
tree2b565090f3d48166481f0aa685f70968e7ea837d /alc/export_list.h
parent44fbc93909a1a1d1dc26c01feb32bf13a5140234 (diff)
More clang-tidy cleanup
And suppress some warnings
Diffstat (limited to 'alc/export_list.h')
-rw-r--r--alc/export_list.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/alc/export_list.h b/alc/export_list.h
index c5af1ab0..7856bdc8 100644
--- a/alc/export_list.h
+++ b/alc/export_list.h
@@ -16,7 +16,8 @@ struct FuncExport {
const char *funcName;
void *address;
};
-#define DECL(x) { #x, reinterpret_cast<void*>(x) }
+#define DECL(x) FuncExport{#x, reinterpret_cast<void*>(x)}
+/* NOLINTNEXTLINE(*-avoid-c-arrays) Too large for std::array auto-deduction :( */
inline const FuncExport alcFunctions[]{
DECL(alcCreateContext),
DECL(alcMakeContextCurrent),
@@ -376,8 +377,9 @@ inline const FuncExport alcFunctions[]{
/* Extra functions */
DECL(alsoft_set_log_callback),
+};
#ifdef ALSOFT_EAX
-}, eaxFunctions[]{
+inline const std::array eaxFunctions{
DECL(EAXGet),
DECL(EAXSet),
DECL(EAXGetBufferMode),
@@ -387,15 +389,16 @@ inline const FuncExport alcFunctions[]{
DECL(EAXSetDirect),
DECL(EAXGetBufferModeDirect),
DECL(EAXSetBufferModeDirect),
-#endif
};
+#endif
#undef DECL
struct EnumExport {
const char *enumName;
int value;
};
-#define DECL(x) { #x, (x) }
+#define DECL(x) EnumExport{#x, (x)}
+/* NOLINTNEXTLINE(*-avoid-c-arrays) Too large for std::array auto-deduction :( */
inline const EnumExport alcEnumerations[]{
DECL(ALC_INVALID),
DECL(ALC_FALSE),
@@ -901,15 +904,16 @@ inline const EnumExport alcEnumerations[]{
DECL(AL_AUXILIARY_EFFECT_SLOT_EXT),
DECL(AL_STOP_SOURCES_ON_DISCONNECT_SOFT),
+};
#ifdef ALSOFT_EAX
-}, eaxEnumerations[]{
+inline const std::array eaxEnumerations{
DECL(AL_EAX_RAM_SIZE),
DECL(AL_EAX_RAM_FREE),
DECL(AL_STORAGE_AUTOMATIC),
DECL(AL_STORAGE_HARDWARE),
DECL(AL_STORAGE_ACCESSIBLE),
-#endif // ALSOFT_EAX
};
+#endif // ALSOFT_EAX
#undef DECL
#endif /* ALC_EXPORT_LIST_H */