From 6a48380461bc9baabe1706ba57ca0cedfa2d0c51 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sat, 28 Feb 2026 21:19:17 -0700 Subject: 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 --- src/d/d_meter_string.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/d/d_meter_string.cpp') diff --git a/src/d/d_meter_string.cpp b/src/d/d_meter_string.cpp index cd0b402505..1f8ee5f1e1 100644 --- a/src/d/d_meter_string.cpp +++ b/src/d/d_meter_string.cpp @@ -58,19 +58,19 @@ int dMeterString_c::_create() { mpGetInBck = (J2DAnmTransformKey*)J2DAnmLoaderDataBase::load( JKRGetNameResource("zelda_game_image_cow_get_in.bck", mpMapArchive)); - mpParentPane = new CPaneMgr(mpScreen, 'get_in_n', 2, NULL); + mpParentPane = new CPaneMgr(mpScreen, MULTI_CHAR('get_in_n'), 2, NULL); JUT_ASSERT(0, mpParentPane != NULL); - mpRootPane = new CPaneMgr(mpScreen, 'n_all', 0, NULL); + mpRootPane = new CPaneMgr(mpScreen, MULTI_CHAR('n_all'), 0, NULL); JUT_ASSERT(0, mpRootPane != NULL); - mpTextPane = new CPaneMgr(mpScreen, 'get_in', 0, NULL); + mpTextPane = new CPaneMgr(mpScreen, MULTI_CHAR('get_in'), 0, NULL); JUT_ASSERT(0, mpTextPane != NULL); - static_cast(mpScreen->search('get_in_s'))->setFont(mDoExt_getMesgFont()); - static_cast(mpScreen->search('get_in'))->setFont(mDoExt_getMesgFont()); - static_cast(mpScreen->search('get_in_s'))->setString(0x100, ""); - static_cast(mpScreen->search('get_in'))->setString(0x100, ""); + static_cast(mpScreen->search(MULTI_CHAR('get_in_s')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('get_in')))->setFont(mDoExt_getMesgFont()); + static_cast(mpScreen->search(MULTI_CHAR('get_in_s')))->setString(0x100, ""); + static_cast(mpScreen->search(MULTI_CHAR('get_in')))->setString(0x100, ""); mAnimFrame = 0.0f; mPikariAnimFrame = 0.0f; @@ -166,8 +166,8 @@ int dMeterString_c::_delete() { int dMeterString_c::createString(int i_stringID) { char str_buf[32]; dMeter2Info_getString(i_stringID, str_buf, NULL); - strcpy(static_cast(mpScreen->search('get_in_s'))->getStringPtr(), str_buf); - strcpy(static_cast(mpScreen->search('get_in'))->getStringPtr(), str_buf); + strcpy(static_cast(mpScreen->search(MULTI_CHAR('get_in_s')))->getStringPtr(), str_buf); + strcpy(static_cast(mpScreen->search(MULTI_CHAR('get_in')))->getStringPtr(), str_buf); mAnimFrame = 40.0f; mPikariAnimFrame = -1.0f; -- cgit v1.2.3