Clean up AVOID_UB ifdefs

This commit is contained in:
Arceveti committed 2021-09-22 11:35:17 -07:00
1 parent f40a1978d9
commit 5afa901fcf
35 files changed
+26 -275

No files matched your search

-3
View File
@@ -2386,10 +2386,7 @@ s32 lvl_init_menu_values_and_cursor_pos(UNUSED s32 arg, UNUSED s32 unused) {
sMainMenuTimer = 0;
sEraseYesNoHoverState = MENU_ERASE_HOVER_NONE;
sSoundMode = save_file_get_sound_mode();
//! no return value
#ifdef AVOID_UB
return 0;
#endif
}
/**
+2 -6
View File
@@ -436,13 +436,9 @@ Gfx *geo_intro_face_easter_egg(s32 state, struct GraphNode *node, UNUSED void *c
Gfx *geo_intro_rumble_pak_graphic(s32 state, struct GraphNode *node, UNUSED void *context) {
struct GraphNodeGenerated *genNode = (struct GraphNodeGenerated *)node;
Gfx *dlIter;
Gfx *dl;
Gfx *dl = NULL;
s32 introContext;
s8 backgroundTileSix;
#ifdef AVOID_UB
dl = NULL;
backgroundTileSix = 0;
#endif
s8 backgroundTileSix = 0;
if (state != 1) {
dl = NULL;
-8
View File
@@ -395,13 +395,8 @@ void print_act_selector_strings(void) {
/**
* Geo function that Print act selector strings.
*!@bug: This geo function is missing the third param. Harmless in practice due to o32 convention.
*/
#ifdef AVOID_UB
Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node, UNUSED void *context) {
#else
Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node) {
#endif
if (callContext == GEO_CONTEXT_RENDER) {
print_act_selector_strings();
}
@@ -426,10 +421,7 @@ s32 lvl_init_act_selector_values_and_stars(UNUSED s32 arg, UNUSED s32 unused) {
sObtainedStars--;
}
//! no return value
#ifdef AVOID_UB
return 0;
#endif
}
/**
-4
View File
@@ -13,11 +13,7 @@ enum StarSelectorTypes
STAR_SELECTOR_100_COINS
};
#ifdef AVOID_UB
Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node, UNUSED void *context);
#else
Gfx *geo_act_selector_strings(s16 callContext, UNUSED struct GraphNode *node);
#endif
s32 lvl_init_act_selector_values_and_stars(UNUSED s32 arg, UNUSED s32 unused);
s32 lvl_update_obj_and_load_act_button_actions(UNUSED s32 arg, UNUSED s32 unused);