summaryrefslogtreecommitdiff
path: root/src/Z2AudioCS/SpkSystem.cpp
diff options
context:
space:
mode:
authorPieter-Jan Briers <pieterjan.briers@gmail.com>2026-02-23 20:17:37 +0100
committerGitHub <noreply@github.com>2026-02-23 11:17:37 -0800
commit96ffd91c9a2cd145c0a40fb05de47af695fa6ffb (patch)
tree42c3f768bb1593d8b74a9917788f78cc90bcb86d /src/Z2AudioCS/SpkSystem.cpp
parent59fd9f387a96f7b5975b867a50582d45f730a445 (diff)
Fix JASGlobalInstance instance definitions (#3108)
There are a few places where JASGlobalInstance have their sInstance storage implemented via template specialization. The problem is that these have no initializer, which means that they are not proper definitions (only declarations) in standards-compliant C++. MSVC and (evidently) MWCC accept this, but modern Clang and GCC do not and won't emit symbols. I've added a macro that properly initializes these outside MWCC. Also, JASGlobalInstance<JAUSectionHeap> was only being declared in each actor file that used it, which sounds incorrect? Not sure about this but I added it to m_Do_main too, again behind MWERKS check.
Diffstat (limited to 'src/Z2AudioCS/SpkSystem.cpp')
-rw-r--r--src/Z2AudioCS/SpkSystem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Z2AudioCS/SpkSystem.cpp b/src/Z2AudioCS/SpkSystem.cpp
index 9e245f7503..ebb4c71ff6 100644
--- a/src/Z2AudioCS/SpkSystem.cpp
+++ b/src/Z2AudioCS/SpkSystem.cpp
@@ -7,8 +7,8 @@
#include "JSystem/JAudio2/JASHeapCtrl.h"
#include "JSystem/JKernel/JKRHeap.h"
-template<> SpkSystem* JASGlobalInstance<SpkSystem>::sInstance;
-template<> SpkSoundHolder* JASGlobalInstance<SpkSoundHolder>::sInstance;
+template<> SpkSystem* JASGlobalInstance<SpkSystem>::sInstance JAS_GLOBAL_INSTANCE_INIT;
+template<> SpkSoundHolder* JASGlobalInstance<SpkSoundHolder>::sInstance JAS_GLOBAL_INSTANCE_INIT;
const static s32 cConfigVolumeMax = 15;