Simplify code; silence warnings

This commit is contained in:
twinaphex 2021-02-09 15:41:26 +01:00
parent 561d2744f0
commit aba9479ed0
2 changed files with 7 additions and 19 deletions

View File

@ -692,15 +692,9 @@ static int manual_content_scan_system_name_right(unsigned type, const char *labe
next_index = current_index + 1;
if (next_index >= system_name_list->size)
{
if (wraparound)
next_index = 0;
else
{
if (system_name_list->size > 0)
next_index = system_name_list->size - 1;
else
next_index = 0;
}
next_index = 0;
if (!wraparound && system_name_list->size > 0)
next_index = (unsigned)(system_name_list->size - 1);
}
}
@ -757,15 +751,9 @@ static int manual_content_scan_core_name_right(unsigned type, const char *label,
next_index = current_index + 1;
if (next_index >= core_name_list->size)
{
if (wraparound)
next_index = 0;
else
{
if (core_name_list->size > 0)
next_index = core_name_list->size - 1;
else
next_index = 0;
}
next_index = 0;
if (!wraparound && core_name_list->size > 0)
next_index = (unsigned)(core_name_list->size - 1);
}
}

View File

@ -551,7 +551,7 @@ void menu_driver_get_last_shader_pass_path(
const char *menu_driver_get_last_start_directory(void);
const char *menu_driver_get_last_start_file_name(void);
void menu_driver_set_last_start_content(const char *start_content_path);
const char *menu_driver_get_pending_selection();
const char *menu_driver_get_pending_selection(void);
void menu_driver_set_pending_selection(const char *pending_selection);
menu_handle_t *menu_driver_get_ptr(void);