Merge pull request #4206 from gudnimg/sd-card-menu-opt
optimisation: `menu_item == menu_line` is always true in `menu_item_sddir()` and `menu_item_sdfile()`
This commit is contained in:
commit
0aa380b931
|
|
@ -279,8 +279,6 @@ static void lcd_implementation_drawmenu_sddirectory(uint8_t row, const char* lon
|
||||||
|
|
||||||
static void menu_item_sddir(const char* str_fn, char* str_fnl)
|
static void menu_item_sddir(const char* str_fn, char* str_fnl)
|
||||||
{
|
{
|
||||||
if (menu_item == menu_line)
|
|
||||||
{
|
|
||||||
if (lcd_draw_update)
|
if (lcd_draw_update)
|
||||||
{
|
{
|
||||||
lcd_implementation_drawmenu_sddirectory(menu_row, (str_fnl[0] == '\0') ? str_fn : str_fnl);
|
lcd_implementation_drawmenu_sddirectory(menu_row, (str_fnl[0] == '\0') ? str_fn : str_fnl);
|
||||||
|
|
@ -293,14 +291,11 @@ static void menu_item_sddir(const char* str_fn, char* str_fnl)
|
||||||
menu_item_ret();
|
menu_item_ret();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
menu_item++;
|
menu_item++;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void menu_item_sdfile(const char* str_fn, char* str_fnl)
|
static void menu_item_sdfile(const char* str_fn, char* str_fnl)
|
||||||
{
|
{
|
||||||
if (menu_item == menu_line)
|
|
||||||
{
|
|
||||||
if (lcd_draw_update)
|
if (lcd_draw_update)
|
||||||
{
|
{
|
||||||
lcd_implementation_drawmenu_sdfile(menu_row, (str_fnl[0] == '\0') ? str_fn : str_fnl);
|
lcd_implementation_drawmenu_sdfile(menu_row, (str_fnl[0] == '\0') ? str_fn : str_fnl);
|
||||||
|
|
@ -313,7 +308,6 @@ static void menu_item_sdfile(const char* str_fn, char* str_fnl)
|
||||||
menu_item_ret();
|
menu_item_ret();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
menu_item++;
|
menu_item++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue