Reduce need for UNUSED
This commit is contained in:
@ -114,8 +114,7 @@ FORCE_INLINE void draw_menu_item_edit_P(const bool sel, const uint8_t row, PGM_P
|
||||
FORCE_INLINE void draw_menu_item_edit_##NAME (const bool sel, const uint8_t row, PGM_P const pstr, TYPE * const data, ...) { \
|
||||
DRAW_MENU_ITEM_SETTING_EDIT_GENERIC(STRFUNC(*(data))); \
|
||||
} \
|
||||
FORCE_INLINE void draw_menu_item_edit_accessor_##NAME (const bool sel, const uint8_t row, PGM_P const pstr, PGM_P const pstr2, TYPE (*pget)(), void (*pset)(TYPE), ...) { \
|
||||
UNUSED(pstr2); UNUSED(pset); \
|
||||
FORCE_INLINE void draw_menu_item_edit_accessor_##NAME (const bool sel, const uint8_t row, PGM_P const pstr, PGM_P const, TYPE (*pget)(), void (*)(TYPE), ...) { \
|
||||
DRAW_MENU_ITEM_SETTING_EDIT_GENERIC(STRFUNC(pget())); \
|
||||
} \
|
||||
typedef void NAME##_void
|
||||
@ -149,13 +148,12 @@ DEFINE_DRAW_MENU_ITEM_SETTING_EDIT(long5_25); // 12345 right-justif
|
||||
|
||||
class MenuItem_back {
|
||||
public:
|
||||
static inline void action(PGM_P const dummy=nullptr) {
|
||||
static inline void action(PGM_P const=nullptr) {
|
||||
ui.goto_previous_screen(
|
||||
#if ENABLED(TURBO_BACK_MENU_ITEM)
|
||||
true
|
||||
#endif
|
||||
);
|
||||
UNUSED(dummy);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -108,6 +108,7 @@ class MenuItem_sdfile {
|
||||
MenuItem_submenu::action(pstr, menu_sd_confirm);
|
||||
#else
|
||||
sdcard_start_selected_file();
|
||||
UNUSED(pstr);
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
@ -273,7 +273,7 @@ public:
|
||||
|
||||
static void init();
|
||||
static void update();
|
||||
static void set_alert_status_P(PGM_P message);
|
||||
static void set_alert_status_P(PGM_P const message);
|
||||
|
||||
static char status_message[];
|
||||
static bool has_status();
|
||||
@ -393,10 +393,10 @@ public:
|
||||
static inline void update() {}
|
||||
static inline void refresh() {}
|
||||
static inline void return_to_status() {}
|
||||
static inline void set_alert_status_P(PGM_P message) { UNUSED(message); }
|
||||
static inline void set_status(const char* const message, const bool persist=false) { UNUSED(message); UNUSED(persist); }
|
||||
static inline void set_status_P(PGM_P const message, const int8_t level=0) { UNUSED(message); UNUSED(level); }
|
||||
static inline void status_printf_P(const uint8_t level, PGM_P const fmt, ...) { UNUSED(level); UNUSED(fmt); }
|
||||
static inline void set_alert_status_P(PGM_P const) {}
|
||||
static inline void set_status(const char* const, const bool=false) {}
|
||||
static inline void set_status_P(PGM_P const, const int8_t=0) {}
|
||||
static inline void status_printf_P(const uint8_t, PGM_P const, ...) {}
|
||||
static inline void reset_status() {}
|
||||
static inline void reset_alert_level() {}
|
||||
static constexpr bool has_status() { return false; }
|
||||
|
Reference in New Issue
Block a user