Apply TERN to compact code (#17619)
This commit is contained in:
@ -44,13 +44,7 @@ FORCE_INLINE void set_all_unhomed() { axis_homed = 0; }
|
||||
FORCE_INLINE void set_all_unknown() { axis_known_position = 0; }
|
||||
|
||||
FORCE_INLINE bool homing_needed() {
|
||||
return !(
|
||||
#if ENABLED(HOME_AFTER_DEACTIVATE)
|
||||
all_axes_known()
|
||||
#else
|
||||
all_axes_homed()
|
||||
#endif
|
||||
);
|
||||
return !TERN(HOME_AFTER_DEACTIVATE, all_axes_known, all_axes_homed)();
|
||||
}
|
||||
|
||||
// Error margin to work around float imprecision
|
||||
@ -136,7 +130,7 @@ inline float home_bump_mm(const AxisEnum axis) {
|
||||
#if HAS_WORKSPACE_OFFSET
|
||||
void update_workspace_offset(const AxisEnum axis);
|
||||
#else
|
||||
#define update_workspace_offset(x) NOOP
|
||||
inline void update_workspace_offset(const AxisEnum) {}
|
||||
#endif
|
||||
|
||||
#if HAS_HOTEND_OFFSET
|
||||
|
Reference in New Issue
Block a user