diff options
| author | Luke Street <luke@street.dev> | 2026-02-28 21:19:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-28 20:19:17 -0800 |
| commit | 6a48380461bc9baabe1706ba57ca0cedfa2d0c51 (patch) | |
| tree | 593e054cfcb0250e63917c58b445a7e1f025a023 /include/JSystem/JStudio | |
| parent | b5d3b8c059c10711370437f7db7539cd90f1cb29 (diff) | |
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
Diffstat (limited to 'include/JSystem/JStudio')
| -rw-r--r-- | include/JSystem/JStudio/JStudio/fvb-data.h | 2 | ||||
| -rw-r--r-- | include/JSystem/JStudio/JStudio/stb.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/include/JSystem/JStudio/JStudio/fvb-data.h b/include/JSystem/JStudio/JStudio/fvb-data.h index b88f637dbb..3932d0edc1 100644 --- a/include/JSystem/JStudio/JStudio/fvb-data.h +++ b/include/JSystem/JStudio/JStudio/fvb-data.h @@ -14,7 +14,7 @@ extern const char ga4cSignature[4]; const int PARAGRAPH_DATA = 1; -typedef enum TEComposite { +enum TEComposite { /* 0x0 */ COMPOSITE_NONE, /* 0x1 */ COMPOSITE_RAW, /* 0x2 */ COMPOSITE_IDX, diff --git a/include/JSystem/JStudio/JStudio/stb.h b/include/JSystem/JStudio/JStudio/stb.h index 20813969ff..b17bb57a8c 100644 --- a/include/JSystem/JStudio/JStudio/stb.h +++ b/include/JSystem/JStudio/JStudio/stb.h @@ -5,6 +5,7 @@ #include "JSystem/JStudio/JStudio/object-id.h" #include "JSystem/JStudio/JStudio/stb-data-parse.h" #include <dolphin/os.h> +#include <cstdint> namespace JStudio { class TObject; @@ -86,7 +87,7 @@ public: const void* getSequence() const { return pSequence; } void setSequence_(const void* arg1) { pSequence = arg1; } const void* getSequence_offset(s32 i_no) const { - int s32Val = (s32)getSequence(); + intptr_t s32Val = (intptr_t)getSequence(); return (const void*)(s32Val + i_no); } const void* getSequence_next() const { return pSequence_next; } |
