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 /src/f_pc/f_pc_pause.cpp | |
| 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 'src/f_pc/f_pc_pause.cpp')
| -rw-r--r-- | src/f_pc/f_pc_pause.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/f_pc/f_pc_pause.cpp b/src/f_pc/f_pc_pause.cpp index a3484d1c7c..60515726b0 100644 --- a/src/f_pc/f_pc_pause.cpp +++ b/src/f_pc/f_pc_pause.cpp @@ -6,6 +6,7 @@ #include "f_pc/f_pc_pause.h" #include "f_pc/f_pc_node.h" #include "f_pc/f_pc_layer_iter.h" +#include <cstdint> int fpcPause_IsEnable(void* i_proc, u8 i_flag) { if ((((base_process_class*)i_proc)->pause_flag & i_flag) == i_flag) { @@ -20,7 +21,7 @@ int fpcPause_Enable(void* i_proc, u8 i_flag) { if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) { fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Enable, - (void*)i_flag); + (void*)(uintptr_t)i_flag); } return 1; } @@ -30,7 +31,7 @@ int fpcPause_Disable(void* i_proc, u8 i_flag) { ((base_process_class*)i_proc)->pause_flag &= var_r31; if (fpcBs_Is_JustOfType(g_fpcNd_type, ((base_process_class*)i_proc)->subtype)) { - fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)i_flag); + fpcLyIt_OnlyHere(&((process_node_class*)i_proc)->layer, (fpcLyIt_OnlyHereFunc)fpcPause_Disable, (void*)(uintptr_t)i_flag); } return 1; |
