Fix some Clang compile warnings

This commit is contained in:
Max Roncace
2026-03-14 18:30:35 -04:00
parent 1a7860d805
commit 4fd2ddd67a
10 changed files with 49 additions and 21 deletions
@@ -116,7 +116,13 @@ public:
// same logic but without the bug.
// See J3DMaterialFactory::newColorChan - both the bugged and correct behavior are present there, as it calls
// both constructors.
#if TARGET_PC
// The faulty comparison is EXTREMELY noisy in the build due to warnings being emitted for
// every TU that includes it - best to just remove it since it doesn't do anything anyway.
u32 ambSrc = info.mAmbSrc;
#else
u32 ambSrc = info.mAmbSrc == 0xFFFF ? 0 : info.mAmbSrc;
#endif
mColorChanID = calcColorChanID(info.mEnable, info.mMatSrc, info.mLightMask,
info.mDiffuseFn, info.mAttnFn, ambSrc);
}
@@ -99,7 +99,12 @@ public:
static JHIComPortManager<T>* getInstance() { return instance; }
#ifdef __MWERKS__
static JHIComPortManager<T>* instance;
#else
// C++17 allows in-class instantiation
static inline JHIComPortManager<T>* instance = nullptr;
#endif
/* 0x00000 */ T port;
/* 0x0000C */ JHIpvector<JHITag<T>*, 10> field_0xc;