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.
This commit is contained in:
Pieter-Jan Briers
2026-02-23 20:17:37 +01:00
committed by GitHub
parent 59fd9f387a
commit 96ffd91c9a
3 changed files with 36 additions and 25 deletions
+6
View File
@@ -4,6 +4,12 @@
#include "JSystem/JUtility/JUTAssert.h"
#include <string>
#ifdef __MWERKS__
#define JAS_GLOBAL_INSTANCE_INIT
#else
#define JAS_GLOBAL_INSTANCE_INIT {}
#endif
/**
* @ingroup jsystem-jaudio
*