Reduce code size with plain inlines

This commit is contained in:
Scott Lahteine
2018-11-11 07:51:39 -06:00
parent 30a49f5ee2
commit 471f403a67
9 changed files with 74 additions and 80 deletions

View File

@ -51,8 +51,6 @@ enum MeshPointType : char { INVALID, REAL, SET_IN_BITMAP };
extern uint8_t ubl_cnt;
///////////////////////////////////////////////////////////////////////////////////////////////////////
#if ENABLED(ULTRA_LCD)
void lcd_quick_feedback(const bool clear_buttons);
#endif
@ -346,11 +344,11 @@ class unified_bed_leveling {
return z0;
}
FORCE_INLINE static float mesh_index_to_xpos(const uint8_t i) {
static inline float mesh_index_to_xpos(const uint8_t i) {
return i < GRID_MAX_POINTS_X ? pgm_read_float(&_mesh_index_to_xpos[i]) : MESH_MIN_X + i * (MESH_X_DIST);
}
FORCE_INLINE static float mesh_index_to_ypos(const uint8_t i) {
static inline float mesh_index_to_ypos(const uint8_t i) {
return i < GRID_MAX_POINTS_Y ? pgm_read_float(&_mesh_index_to_ypos[i]) : MESH_MIN_Y + i * (MESH_Y_DIST);
}