From 7529eaec44121d3127356289d68847cea83db1a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gu=C3=B0ni=20M=C3=A1r=20Gilbert?= Date: Sat, 10 Dec 2022 20:59:09 +0000 Subject: [PATCH] Remove duplicate code msg_next is NULL, then the end of the message has been reached. Change in memory: Flash: -24 bytes SRAM: 0 bytes --- Firmware/ultralcd.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 9d0e7f29b..42f42141f 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -3078,7 +3078,7 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg) KEEPALIVE_STATE(PAUSED_FOR_USER); // Until confirmed by a button click. for (;;) { - if (!multi_screen) { + if (msg_next == NULL) { lcd_set_cursor(19, 3); // Display the confirm char. lcd_print(LCD_STR_CONFIRM[0]); @@ -3101,12 +3101,6 @@ void lcd_show_fullscreen_message_and_wait_P(const char *msg) if (msg_next == NULL) msg_next = msg; msg_next = lcd_display_message_fullscreen_P(msg_next); - if (msg_next == NULL) { - - lcd_set_cursor(19, 3); - // Display the confirm char. - lcd_print(LCD_STR_CONFIRM[0]); - } } } }