From eae2d7a2bf7d9b829955236eb17ab934156cf374 Mon Sep 17 00:00:00 2001 From: robojumper Date: Tue, 1 Oct 2024 14:55:30 +0200 Subject: [PATCH] Fix some compiler warnings (#44) --- include/c/c_math.h | 2 +- include/nw4r/snd/snd_Util.h | 2 +- src/f/f_base.cpp | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/c/c_math.h b/include/c/c_math.h index 7489332a..d54c94d9 100644 --- a/include/c/c_math.h +++ b/include/c/c_math.h @@ -4,7 +4,7 @@ #include namespace cM { -static s16 atan2s(f32, f32); +s16 atan2s(f32, f32); void initRnd(s32); f32 rnd(); int rndInt(int max); diff --git a/include/nw4r/snd/snd_Util.h b/include/nw4r/snd/snd_Util.h index 58b30414..b00de255 100644 --- a/include/nw4r/snd/snd_Util.h +++ b/include/nw4r/snd/snd_Util.h @@ -47,7 +47,7 @@ struct DataRef { template struct Table { u32 count; // at 0x0 - T items[]; // at 0x4 + T items[1]; // at 0x4 }; template diff --git a/src/f/f_base.cpp b/src/f/f_base.cpp index 188ace59..c5652418 100644 --- a/src/f/f_base.cpp +++ b/src/f/f_base.cpp @@ -120,7 +120,7 @@ int fBase_c::doDelete() { /* 802e1680 */ int fBase_c::createPack() { // Returns PACK_RESULT_e - return commonPack(&create, &preCreate, &postCreate); + return commonPack(&fBase_c::create, &fBase_c::preCreate, &fBase_c::postCreate); } /* 802e1730 */ @@ -168,7 +168,7 @@ void fBase_c::postDelete(MAIN_STATE_e state) { /* 802e15d0 */ int fBase_c::deletePack() { // Returns PACK_RESULT_e - return commonPack(&doDelete, &preDelete, &postDelete); + return commonPack(&fBase_c::doDelete, &fBase_c::preDelete, &fBase_c::postDelete); } /* 802e1910 */ @@ -195,12 +195,12 @@ void fBase_c::postExecute(MAIN_STATE_e state) { /* 802e1960 */ int fBase_c::executePack() { // Returns PACK_RESULT_e - int result = commonPack(&execute, &preExecute, &postExecute); + int result = commonPack(&fBase_c::execute, &fBase_c::preExecute, &fBase_c::postExecute); // Check force update list (bamboo cut to force a cut type of thing) fLiNdBa_c *node = m_forceExecuteList.getFirst(); while (node != nullptr) { - node->p_owner->commonPack(&execute, &preExecute, &postExecute); + node->p_owner->commonPack(&fBase_c::execute, &fBase_c::preExecute, &fBase_c::postExecute); fLiNdBa_c *tempNode = node->getNext(); m_forceExecuteList.remove(node); node = tempNode; @@ -233,7 +233,7 @@ void fBase_c::postDraw(MAIN_STATE_e state) { /* 802e1ae0 */ int fBase_c::drawPack() { // Returns PACK_RESULT_e - return commonPack(&draw, &preDraw, &postDraw); + return commonPack(&fBase_c::draw, &fBase_c::preDraw, &fBase_c::postDraw); } /* 802e1b90 */