Reduce need for UNUSED

This commit is contained in:
Scott Lahteine
2019-09-30 21:44:07 -05:00
parent e3ff27c95a
commit e3fd0519b3
31 changed files with 104 additions and 143 deletions

View File

@ -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);
}
};

View File

@ -108,6 +108,7 @@ class MenuItem_sdfile {
MenuItem_submenu::action(pstr, menu_sd_confirm);
#else
sdcard_start_selected_file();
UNUSED(pstr);
#endif
}
};