summaryrefslogtreecommitdiff
path: root/src/d/d_bright_check.cpp
diff options
context:
space:
mode:
authorLuke Street <luke@street.dev>2026-02-28 21:19:17 -0700
committerGitHub <noreply@github.com>2026-02-28 20:19:17 -0800
commit6a48380461bc9baabe1706ba57ca0cedfa2d0c51 (patch)
tree593e054cfcb0250e63917c58b445a7e1f025a023 /src/d/d_bright_check.cpp
parentb5d3b8c059c10711370437f7db7539cd90f1cb29 (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/d/d_bright_check.cpp')
-rw-r--r--src/d/d_bright_check.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/d/d_bright_check.cpp b/src/d/d_bright_check.cpp
index 75537717e1..e7695b7451 100644
--- a/src/d/d_bright_check.cpp
+++ b/src/d/d_bright_check.cpp
@@ -28,32 +28,32 @@ dBrightCheck_c::~dBrightCheck_c() {
void dBrightCheck_c::screenSet() {
static u64 const tv_btnA[] = {
- 'cont_at1', 'cont_at2', 'cont_at3', 'cont_at4', 'cont_at',
+ MULTI_CHAR('cont_at1'), MULTI_CHAR('cont_at2'), MULTI_CHAR('cont_at3'), MULTI_CHAR('cont_at4'), MULTI_CHAR('cont_at'),
};
static u64 const ftv_btnA[] = {
- 'font_a1', 'font_at2', 'font_at3', 'font_at4', 'font_at',
+ MULTI_CHAR('font_a1'), MULTI_CHAR('font_at2'), MULTI_CHAR('font_at3'), MULTI_CHAR('font_at4'), MULTI_CHAR('font_at'),
};
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
static u64 const txTV[] = {
- 'menu_t6s', 'menu_t6', 'menu_t9s', 'menu_t9', 'menut10s',
- 'menu_t10', 'menu_t7s', 'menu_t7', 'menu_t8s', 'menu_t8',
+ MULTI_CHAR('menu_t6s'), MULTI_CHAR('menu_t6'), MULTI_CHAR('menu_t9s'), MULTI_CHAR('menu_t9'), MULTI_CHAR('menut10s'),
+ MULTI_CHAR('menu_t10'), MULTI_CHAR('menu_t7s'), MULTI_CHAR('menu_t7'), MULTI_CHAR('menu_t8s'), MULTI_CHAR('menu_t8'),
};
#else
static u64 const txTV[] = {
- 'menu_t61', 'menu_t2', 'menu_t91', 'menu_t1', 'menut101',
- 'menu_t01', 'menu_t71', 'menu_t3', 'menu_t81', 'menu_t4',
+ MULTI_CHAR('menu_t61'), MULTI_CHAR('menu_t2'), MULTI_CHAR('menu_t91'), MULTI_CHAR('menu_t1'), MULTI_CHAR('menut101'),
+ MULTI_CHAR('menu_t01'), MULTI_CHAR('menu_t71'), MULTI_CHAR('menu_t3'), MULTI_CHAR('menu_t81'), MULTI_CHAR('menu_t4'),
};
#endif
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
static u64 const txTVhide[] = {
- 'fmenu_6n', 'fmenu_9n', 'fmenu_10', 'fmenu_7n', 'fmenu_8n',
+ MULTI_CHAR('fmenu_6n'), MULTI_CHAR('fmenu_9n'), MULTI_CHAR('fmenu_10'), MULTI_CHAR('fmenu_7n'), MULTI_CHAR('fmenu_8n'),
};
#else
static u64 const txTVhide[] = {
- 'menu_6n', 'menu_9n', 'menu_10n', 'menu_7n', 'menu_8n',
+ MULTI_CHAR('menu_6n'), MULTI_CHAR('menu_9n'), MULTI_CHAR('menu_10n'), MULTI_CHAR('menu_7n'), MULTI_CHAR('menu_8n'),
};
#endif
@@ -61,16 +61,16 @@ void dBrightCheck_c::screenSet() {
JUT_ASSERT(0, mBrightCheck.Scr != NULL);
mBrightCheck.Scr->setPriority("zelda_option_check.blo", 0x1100000, mArchive);
- mBrightCheck.Scr->search('g_abtn_n')->hide();
+ mBrightCheck.Scr->search(MULTI_CHAR('g_abtn_n'))->hide();
#if (VERSION == VERSION_GCN_JPN) || (VERSION == VERSION_WII_JPN)
- J2DTextBox* settings_text = (J2DTextBox*)mBrightCheck.Scr->search('t_t00');
- mBrightCheck.Scr->search('t_t00')->show();
- mBrightCheck.Scr->search('f_t00')->hide();
+ J2DTextBox* settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('t_t00'));
+ mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->show();
+ mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->hide();
#else
- J2DTextBox* settings_text = (J2DTextBox*)mBrightCheck.Scr->search('f_t00');
- mBrightCheck.Scr->search('f_t00')->show();
- mBrightCheck.Scr->search('t_t00')->hide();
+ J2DTextBox* settings_text = (J2DTextBox*)mBrightCheck.Scr->search(MULTI_CHAR('f_t00'));
+ mBrightCheck.Scr->search(MULTI_CHAR('f_t00'))->show();
+ mBrightCheck.Scr->search(MULTI_CHAR('t_t00'))->hide();
#endif
settings_text->setFont(mDoExt_getRubyFont());