aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2022-02-01 04:05:59 -0800
committerChris Robinson <[email protected]>2022-02-01 04:05:59 -0800
commita98a76c4e038c6dc53fb8d4d3caca5af21d436d3 (patch)
tree6ca76f5ecacb73bb555813917f302958679a0040
parentf63594d027889690936f8564ea822e4ab5068245 (diff)
Avoid global pointers to string literals
-rw-r--r--al/eax_globals.cpp20
-rw-r--r--al/eax_globals.h21
2 files changed, 20 insertions, 21 deletions
diff --git a/al/eax_globals.cpp b/al/eax_globals.cpp
index 4f5446d0..74bad0f8 100644
--- a/al/eax_globals.cpp
+++ b/al/eax_globals.cpp
@@ -6,16 +6,16 @@
bool eax_g_is_enabled = true;
-const char* eax_v2_0_ext_name_1 = "EAX";
-const char* eax_v2_0_ext_name_2 = "EAX2.0";
-const char* eax_v3_0_ext_name = "EAX3.0";
-const char* eax_v4_0_ext_name = "EAX4.0";
-const char* eax_v5_0_ext_name = "EAX5.0";
+const char eax_v2_0_ext_name_1[] = "EAX";
+const char eax_v2_0_ext_name_2[] = "EAX2.0";
+const char eax_v3_0_ext_name[] = "EAX3.0";
+const char eax_v4_0_ext_name[] = "EAX4.0";
+const char eax_v5_0_ext_name[] = "EAX5.0";
-const char* eax_x_ram_ext_name = "EAX-RAM";
+const char eax_x_ram_ext_name[] = "EAX-RAM";
-const char* eax_eax_set_func_name = "EAXSet";
-const char* eax_eax_get_func_name = "EAXGet";
+const char eax_eax_set_func_name[] = "EAXSet";
+const char eax_eax_get_func_name[] = "EAXGet";
-const char* eax_eax_set_buffer_mode_func_name = "EAXSetBufferMode";
-const char* eax_eax_get_buffer_mode_func_name = "EAXGetBufferMode";
+const char eax_eax_set_buffer_mode_func_name[] = "EAXSetBufferMode";
+const char eax_eax_get_buffer_mode_func_name[] = "EAXGetBufferMode";
diff --git a/al/eax_globals.h b/al/eax_globals.h
index a3cecfe2..310098a7 100644
--- a/al/eax_globals.h
+++ b/al/eax_globals.h
@@ -5,19 +5,18 @@
extern bool eax_g_is_enabled;
-extern const char* eax_v2_0_ext_name_1;
-extern const char* eax_v2_0_ext_name_2;
-extern const char* eax_v3_0_ext_name;
-extern const char* eax_v4_0_ext_name;
-extern const char* eax_v5_0_ext_name;
+extern const char eax_v2_0_ext_name_1[];
+extern const char eax_v2_0_ext_name_2[];
+extern const char eax_v3_0_ext_name[];
+extern const char eax_v4_0_ext_name[];
+extern const char eax_v5_0_ext_name[];
-extern const char* eax_x_ram_ext_name;
+extern const char eax_x_ram_ext_name[];
-extern const char* eax_eax_set_func_name;
-extern const char* eax_eax_get_func_name;
-
-extern const char* eax_eax_set_buffer_mode_func_name;
-extern const char* eax_eax_get_buffer_mode_func_name;
+extern const char eax_eax_set_func_name[];
+extern const char eax_eax_get_func_name[];
+extern const char eax_eax_set_buffer_mode_func_name[];
+extern const char eax_eax_get_buffer_mode_func_name[];
#endif // !EAX_GLOBALS_INCLUDED