[dynamic multichoice] fix -Wall warnings / errors
This commit is contained in:
parent
c27ea10eb1
commit
7f3264c151
3 changed files with 5 additions and 4 deletions
|
@ -887,7 +887,7 @@ bool8 ListMenuChangeSelectionFull(struct ListMenu *list, bool32 updateCursor, bo
|
|||
|
||||
bool8 ListMenuChangeSelection(struct ListMenu *list, bool8 updateCursorAndCallCallback, u8 count, bool8 movingDown)
|
||||
{
|
||||
ListMenuChangeSelectionFull(list, updateCursorAndCallCallback, updateCursorAndCallCallback, count, movingDown);
|
||||
return ListMenuChangeSelectionFull(list, updateCursorAndCallCallback, updateCursorAndCallCallback, count, movingDown);
|
||||
}
|
||||
|
||||
static void ListMenuCallSelectionChangedCallback(struct ListMenu *list, u8 onInit)
|
||||
|
|
|
@ -1390,7 +1390,7 @@ bool8 ScrCmd_dynmultichoice(struct ScriptContext *ctx)
|
|||
struct ListMenuItem *items;
|
||||
|
||||
if (argc == 0)
|
||||
return;
|
||||
return FALSE;
|
||||
|
||||
if (maxBeforeScroll == 0xFF)
|
||||
maxBeforeScroll = DYN_MULTICHOICE_DEFAULT_MAX_BEFORE_SCROLL;
|
||||
|
@ -1446,6 +1446,7 @@ bool8 ScrCmd_dynmultipush(struct ScriptContext *ctx)
|
|||
item.name = nameBuffer;
|
||||
item.id = id;
|
||||
MultichoiceDynamic_PushElement(item);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_multichoice(struct ScriptContext *ctx)
|
||||
|
|
|
@ -387,7 +387,7 @@ static void DrawMultichoiceMenuDynamic(u8 left, u8 top, u8 argc, struct ListMenu
|
|||
gTasks[taskId].data[2] = windowId;
|
||||
gTasks[taskId].data[5] = argc;
|
||||
gTasks[taskId].data[7] = maxBeforeScroll;
|
||||
StoreWordInTwoHalfwords(&gTasks[taskId].data[3], (u32) items);
|
||||
StoreWordInTwoHalfwords((u16*) &gTasks[taskId].data[3], (u32) items);
|
||||
list = (void *) gTasks[gTasks[taskId].data[0]].data;
|
||||
ListMenuChangeSelectionFull(list, TRUE, FALSE, initialRow, TRUE);
|
||||
|
||||
|
@ -524,7 +524,7 @@ static void Task_HandleScrollingMultichoiceInput(u8 taskId)
|
|||
RemoveScrollIndicatorArrowPair(gTasks[taskId].data[6]);
|
||||
}
|
||||
|
||||
LoadWordFromTwoHalfwords(&gTasks[taskId].data[3], (u32* )(&items));
|
||||
LoadWordFromTwoHalfwords((u16*) &gTasks[taskId].data[3], (u32* )(&items));
|
||||
FreeListMenuItems(items, gTasks[taskId].data[5]);
|
||||
TRY_FREE_AND_SET_NULL(sDynamicMenuEventScratchPad);
|
||||
DestroyListMenuTask(gTasks[taskId].data[0], NULL, NULL);
|
||||
|
|
Loading…
Reference in a new issue