🧑💻 Remove extraneous 'inline' hints
This commit is contained in:
@@ -274,8 +274,8 @@ public:
|
||||
static bool detected();
|
||||
static void init_lcd();
|
||||
#else
|
||||
static inline bool detected() { return true; }
|
||||
static inline void init_lcd() {}
|
||||
static bool detected() { return true; }
|
||||
static void init_lcd() {}
|
||||
#endif
|
||||
|
||||
#if HAS_PRINT_PROGRESS
|
||||
@@ -294,7 +294,7 @@ public:
|
||||
static void set_progress_done() { progress_override = (PROGRESS_MASK + 1U) + 100U * (PROGRESS_SCALE); }
|
||||
static void progress_reset() { if (progress_override & (PROGRESS_MASK + 1U)) set_progress(0); }
|
||||
#if ENABLED(SHOW_REMAINING_TIME)
|
||||
static inline uint32_t _calculated_remaining_time() {
|
||||
static uint32_t _calculated_remaining_time() {
|
||||
const duration_t elapsed = print_job_timer.duration();
|
||||
const progress_t progress = _get_progress();
|
||||
return progress ? elapsed.value * (100 * (PROGRESS_SCALE) - progress) / progress : 0;
|
||||
@@ -342,12 +342,12 @@ public:
|
||||
static bool has_status();
|
||||
static void reset_status(const bool no_welcome=false);
|
||||
static void set_alert_status(FSTR_P const fstr);
|
||||
static inline void reset_alert_level() { alert_level = 0; }
|
||||
static void reset_alert_level() { alert_level = 0; }
|
||||
#else
|
||||
static constexpr bool has_status() { return false; }
|
||||
static inline void reset_status(const bool=false) {}
|
||||
static inline void set_alert_status(FSTR_P const) {}
|
||||
static inline void reset_alert_level() {}
|
||||
static void reset_status(const bool=false) {}
|
||||
static void set_alert_status(FSTR_P const) {}
|
||||
static void reset_alert_level() {}
|
||||
#endif
|
||||
|
||||
static void set_status(const char * const cstr, const bool persist=false);
|
||||
@@ -360,7 +360,7 @@ public:
|
||||
static void draw_status_message(const bool blink);
|
||||
#endif
|
||||
#else
|
||||
static inline void kill_screen(FSTR_P const, FSTR_P const) {}
|
||||
static void kill_screen(FSTR_P const, FSTR_P const) {}
|
||||
#endif
|
||||
|
||||
#if HAS_DISPLAY
|
||||
@@ -444,7 +444,7 @@ public:
|
||||
#if HAS_BUZZER
|
||||
static void completion_feedback(const bool good=true);
|
||||
#else
|
||||
static inline void completion_feedback(const bool=true) { TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); }
|
||||
static void completion_feedback(const bool=true) { TERN_(HAS_TOUCH_SLEEP, wakeup_screen()); }
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE)
|
||||
@@ -479,9 +479,9 @@ public:
|
||||
|
||||
#else // No LCD
|
||||
|
||||
static inline void init() {}
|
||||
static inline void update() {}
|
||||
static inline void return_to_status() {}
|
||||
static void init() {}
|
||||
static void update() {}
|
||||
static void return_to_status() {}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -500,17 +500,17 @@ public:
|
||||
static preheat_t material_preset[PREHEAT_COUNT];
|
||||
static PGM_P get_preheat_label(const uint8_t m);
|
||||
static void apply_preheat(const uint8_t m, const uint8_t pmask, const uint8_t e=active_extruder);
|
||||
static inline void preheat_set_fan(const uint8_t m) { TERN_(HAS_FAN, apply_preheat(m, PM_FAN)); }
|
||||
static inline void preheat_hotend(const uint8_t m, const uint8_t e=active_extruder) { TERN_(HAS_HOTEND, apply_preheat(m, PM_HOTEND)); }
|
||||
static inline void preheat_hotend_and_fan(const uint8_t m, const uint8_t e=active_extruder) { preheat_hotend(m, e); preheat_set_fan(m); }
|
||||
static inline void preheat_bed(const uint8_t m) { TERN_(HAS_HEATED_BED, apply_preheat(m, PM_BED)); }
|
||||
static inline void preheat_all(const uint8_t m) { apply_preheat(m, 0xFF); }
|
||||
static void preheat_set_fan(const uint8_t m) { TERN_(HAS_FAN, apply_preheat(m, PM_FAN)); }
|
||||
static void preheat_hotend(const uint8_t m, const uint8_t e=active_extruder) { TERN_(HAS_HOTEND, apply_preheat(m, PM_HOTEND)); }
|
||||
static void preheat_hotend_and_fan(const uint8_t m, const uint8_t e=active_extruder) { preheat_hotend(m, e); preheat_set_fan(m); }
|
||||
static void preheat_bed(const uint8_t m) { TERN_(HAS_HEATED_BED, apply_preheat(m, PM_BED)); }
|
||||
static void preheat_all(const uint8_t m) { apply_preheat(m, 0xFF); }
|
||||
#endif
|
||||
|
||||
#if SCREENS_CAN_TIME_OUT
|
||||
static inline void reset_status_timeout(const millis_t ms) { return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; }
|
||||
static void reset_status_timeout(const millis_t ms) { return_to_status_ms = ms + LCD_TIMEOUT_TO_STATUS; }
|
||||
#else
|
||||
static inline void reset_status_timeout(const millis_t) {}
|
||||
static void reset_status_timeout(const millis_t) {}
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU
|
||||
@@ -548,11 +548,11 @@ public:
|
||||
|
||||
// goto_previous_screen and go_back may also be used as menu item callbacks
|
||||
static void _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, const bool is_back));
|
||||
static inline void goto_previous_screen() { _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, false)); }
|
||||
static inline void go_back() { _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, true)); }
|
||||
static void goto_previous_screen() { _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, false)); }
|
||||
static void go_back() { _goto_previous_screen(TERN_(TURBO_BACK_MENU_ITEM, true)); }
|
||||
|
||||
static void return_to_status();
|
||||
static inline bool on_status_screen() { return currentScreen == status_screen; }
|
||||
static bool on_status_screen() { return currentScreen == status_screen; }
|
||||
FORCE_INLINE static void run_current_screen() { (*currentScreen)(); }
|
||||
|
||||
#if ENABLED(LIGHTWEIGHT_UI)
|
||||
@@ -567,7 +567,7 @@ public:
|
||||
TERN(SCREENS_CAN_TIME_OUT, defer_return_to_status = defer, UNUSED(defer));
|
||||
}
|
||||
|
||||
static inline void goto_previous_screen_no_defer() {
|
||||
static void goto_previous_screen_no_defer() {
|
||||
defer_status_screen(false);
|
||||
goto_previous_screen();
|
||||
}
|
||||
@@ -599,20 +599,20 @@ public:
|
||||
|
||||
#if EITHER(HAS_LCD_MENU, EXTENSIBLE_UI)
|
||||
static bool lcd_clicked;
|
||||
static inline bool use_click() {
|
||||
static bool use_click() {
|
||||
const bool click = lcd_clicked;
|
||||
lcd_clicked = false;
|
||||
return click;
|
||||
}
|
||||
#else
|
||||
static constexpr bool lcd_clicked = false;
|
||||
static inline bool use_click() { return false; }
|
||||
static bool use_click() { return false; }
|
||||
#endif
|
||||
|
||||
#if ENABLED(ADVANCED_PAUSE_FEATURE) && ANY(HAS_LCD_MENU, EXTENSIBLE_UI, DWIN_CREALITY_LCD_ENHANCED, DWIN_CREALITY_LCD_JYERSUI)
|
||||
static void pause_show_message(const PauseMessage message, const PauseMode mode=PAUSE_MODE_SAME, const uint8_t extruder=active_extruder);
|
||||
#else
|
||||
static inline void _pause_show_message() {}
|
||||
static void _pause_show_message() {}
|
||||
#define pause_show_message(...) _pause_show_message()
|
||||
#endif
|
||||
|
||||
@@ -631,9 +631,9 @@ public:
|
||||
#endif
|
||||
#if DISABLED(EEPROM_AUTO_INIT)
|
||||
static void eeprom_alert(const uint8_t msgid);
|
||||
static inline void eeprom_alert_crc() { eeprom_alert(0); }
|
||||
static inline void eeprom_alert_index() { eeprom_alert(1); }
|
||||
static inline void eeprom_alert_version() { eeprom_alert(2); }
|
||||
static void eeprom_alert_crc() { eeprom_alert(0); }
|
||||
static void eeprom_alert_index() { eeprom_alert(1); }
|
||||
static void eeprom_alert_version() { eeprom_alert(2); }
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -674,7 +674,7 @@ public:
|
||||
#endif
|
||||
|
||||
static void update_buttons();
|
||||
static inline bool button_pressed() { return BUTTON_CLICK() || TERN(TOUCH_SCREEN, touch_pressed(), false); }
|
||||
static bool button_pressed() { return BUTTON_CLICK() || TERN(TOUCH_SCREEN, touch_pressed(), false); }
|
||||
#if EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION)
|
||||
static void wait_for_release();
|
||||
#endif
|
||||
@@ -705,7 +705,7 @@ public:
|
||||
|
||||
#else
|
||||
|
||||
static inline void update_buttons() {}
|
||||
static void update_buttons() {}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user