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/d/d_meter_string.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/d/d_meter_string.cpp')
| -rw-r--r-- | src/d/d_meter_string.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
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<J2DTextBox*>(mpScreen->search('get_in_s'))->setFont(mDoExt_getMesgFont()); - static_cast<J2DTextBox*>(mpScreen->search('get_in'))->setFont(mDoExt_getMesgFont()); - static_cast<J2DTextBox*>(mpScreen->search('get_in_s'))->setString(0x100, ""); - static_cast<J2DTextBox*>(mpScreen->search('get_in'))->setString(0x100, ""); + static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('get_in_s')))->setFont(mDoExt_getMesgFont()); + static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('get_in')))->setFont(mDoExt_getMesgFont()); + static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('get_in_s')))->setString(0x100, ""); + static_cast<J2DTextBox*>(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<J2DTextBox*>(mpScreen->search('get_in_s'))->getStringPtr(), str_buf); - strcpy(static_cast<J2DTextBox*>(mpScreen->search('get_in'))->getStringPtr(), str_buf); + strcpy(static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('get_in_s')))->getStringPtr(), str_buf); + strcpy(static_cast<J2DTextBox*>(mpScreen->search(MULTI_CHAR('get_in')))->getStringPtr(), str_buf); mAnimFrame = 40.0f; mPikariAnimFrame = -1.0f; |
