More GCC compatibility/warning fixes (#3118)

* Wrap >4-char literals in a MULTI_CHAR macro

Modern compilers do not support CW's non-standard behavior with
>4 char literals. We can, however, use a constexpr function to
compute the u64 values directly. This leaves <=4 char literals
unchanged.

* Replace non-pointer usages of NULL with 0

* Define NULL to nullptr on C++11 and above

* Fix more -Wpointer-arith and -Woverflow warnings

* Replace u32/s32 with uintptr_t/intptr_t where appropriate

* JSUOutputStream: Overload all standard int types
This commit is contained in:
Luke Street
2026-02-28 21:19:17 -07:00
committed by GitHub
parent b5d3b8c059
commit 6a48380461
169 changed files with 1849 additions and 1818 deletions
+2 -2
View File
@@ -62,7 +62,7 @@ static void break_eff(obj_kbox_class* i_this) {
fopAcM_GetRoomNo(&i_this->mActor), NULL, NULL, &particleScale);
dPa_modelEcallBack::setModel(pEmitter, kibako_bmd, i_this->mActor.tevStr, 3, NULL, 0, 0);
for (int i = 0; i < 3; i++) {
dComIfGp_particle_set(particle_id[i], &emitterPos, 0, &particleScale, 0xff, 0, 0xffffffff,
dComIfGp_particle_set(particle_id[i], &emitterPos, 0, &particleScale, 0xff, 0, -1,
0, 0, 0);
}
}
@@ -213,7 +213,7 @@ static void kbox_float(obj_kbox_class* i_this) {
i_this->field_0x5a4 + i_this->field_0x590 + i_this->field_0x58c + i_this->field_0x5ac;
i_this->field_0x9e8 = dComIfGp_particle_set(i_this->field_0x9e8, 0x86c3,
&cStack_88, &a_this->tevStr, &a_this->shape_angle,
&cStack_7c, 0xff, 0, 0xffffffff, 0, 0, 0);
&cStack_7c, 0xff, 0, -1, 0, 0, 0);
if (i_this->field_0x5ac <= -50.0f) {
fopAcM_delete(a_this);
dComIfGp_particle_set(0x86c4, &cStack_88, &a_this->tevStr, &a_this->shape_angle,