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

@ -75,7 +75,7 @@ class Max7219 {
public:
static uint8_t led_line[MAX7219_LINES];
Max7219() { }
Max7219() {}
static void init();
static void register_setup();

View File

@ -138,8 +138,7 @@ void pca9632_set_led_color(const LEDColor &color) {
#if ENABLED(PCA9632_BUZZER)
void pca9632_buzz(const long duration, const uint16_t freq) {
UNUSED(duration); UNUSED(freq);
void pca9632_buzz(const long, const uint16_t) {
uint8_t data[] = PCA9632_BUZZER_DATA;
Wire.beginTransmission(I2C_ADDRESS(PCA9632_ADDRESS));
Wire.write(data, sizeof(data));

View File

@ -169,7 +169,7 @@ class PrintJobRecovery {
#if ENABLED(DEBUG_POWER_LOSS_RECOVERY)
static void debug(PGM_P const prefix);
#else
static inline void debug(PGM_P const prefix) { UNUSED(prefix); }
static inline void debug(PGM_P const) {}
#endif
private:

View File

@ -266,7 +266,7 @@ class FilamentSensorBase {
}
public:
static inline void block_completed(const block_t* const b) { UNUSED(b); }
static inline void block_completed(const block_t* const) {}
static inline void run() {
const bool out = poll_runout_state(active_extruder);
@ -353,8 +353,8 @@ class FilamentSensorBase {
static inline void reset() { runout_count = runout_threshold; }
static inline void run() { if (runout_count >= 0) runout_count--; }
static inline bool has_run_out() { return runout_count < 0; }
static inline void block_completed(const block_t* const b) { UNUSED(b); }
static inline void filament_present(const uint8_t extruder) { runout_count = runout_threshold; UNUSED(extruder); }
static inline void block_completed(const block_t* const) { }
static inline void filament_present(const uint8_t) { runout_count = runout_threshold; }
};
#endif // !FILAMENT_RUNOUT_DISTANCE_MM

View File

@ -70,7 +70,7 @@ public:
#if ENABLED(SPINDLE_CHANGE_DIR)
static void set_direction(const bool reverse);
#else
static inline void set_direction(const bool reverse) { UNUSED(reverse); }
static inline void set_direction(const bool) {}
#endif
static inline void disable() { set_enabled(false); }