Optimise _menu_edit_P
If the first if statement is true, then we don't need to check the next if statement. Saves 64 bytes of flash memory
This commit is contained in:
parent
70cb30208c
commit
c2bad473dc
@ -509,7 +509,7 @@ static void _menu_edit_P(void)
|
||||
if (lcd_draw_update)
|
||||
{
|
||||
if (lcd_encoder < _md->minEditValue) lcd_encoder = _md->minEditValue;
|
||||
if (lcd_encoder > _md->maxEditValue) lcd_encoder = _md->maxEditValue;
|
||||
else if (lcd_encoder > _md->maxEditValue) lcd_encoder = _md->maxEditValue;
|
||||
lcd_set_cursor(0, 1);
|
||||
menu_draw_P<T>(' ', _md->editLabel, (int)lcd_encoder);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user