Browse Source

do_blocking_move_to can't be 'inline', takes const ref args

Scott Lahteine 8 years ago
parent
commit
cd496dd9bd
2 changed files with 8 additions and 8 deletions
  1. 4
    4
      Marlin/Marlin.h
  2. 4
    4
      Marlin/Marlin_main.cpp

+ 4
- 4
Marlin/Marlin.h View File

389
 /**
389
 /**
390
  * Blocking movement and shorthand functions
390
  * Blocking movement and shorthand functions
391
  */
391
  */
392
-inline void do_blocking_move_to(float x, float y, float z, float fr_mm_s=0.0);
393
-inline void do_blocking_move_to_x(float x, float fr_mm_s=0.0);
394
-inline void do_blocking_move_to_z(float z, float fr_mm_s=0.0);
395
-inline void do_blocking_move_to_xy(float x, float y, float fr_mm_s=0.0);
392
+void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s=0.0);
393
+void do_blocking_move_to_x(const float &x, const float &fr_mm_s=0.0);
394
+void do_blocking_move_to_z(const float &z, const float &fr_mm_s=0.0);
395
+void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s=0.0);
396
 
396
 
397
 #endif //MARLIN_H
397
 #endif //MARLIN_H

+ 4
- 4
Marlin/Marlin_main.cpp View File

1661
  *  Plan a move to (X, Y, Z) and set the current_position
1661
  *  Plan a move to (X, Y, Z) and set the current_position
1662
  *  The final current_position may not be the one that was requested
1662
  *  The final current_position may not be the one that was requested
1663
  */
1663
  */
1664
-void do_blocking_move_to(float x, float y, float z, float fr_mm_s /*=0.0*/) {
1664
+void do_blocking_move_to(const float &x, const float &y, const float &z, const float &fr_mm_s /*=0.0*/) {
1665
   float old_feedrate_mm_s = feedrate_mm_s;
1665
   float old_feedrate_mm_s = feedrate_mm_s;
1666
 
1666
 
1667
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1667
   #if ENABLED(DEBUG_LEVELING_FEATURE)
1753
 
1753
 
1754
   feedrate_mm_s = old_feedrate_mm_s;
1754
   feedrate_mm_s = old_feedrate_mm_s;
1755
 }
1755
 }
1756
-void do_blocking_move_to_x(float x, float fr_mm_s/*=0.0*/) {
1756
+void do_blocking_move_to_x(const float &x, const float &fr_mm_s/*=0.0*/) {
1757
   do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s);
1757
   do_blocking_move_to(x, current_position[Y_AXIS], current_position[Z_AXIS], fr_mm_s);
1758
 }
1758
 }
1759
-void do_blocking_move_to_z(float z, float fr_mm_s/*=0.0*/) {
1759
+void do_blocking_move_to_z(const float &z, const float &fr_mm_s/*=0.0*/) {
1760
   do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_s);
1760
   do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], z, fr_mm_s);
1761
 }
1761
 }
1762
-void do_blocking_move_to_xy(float x, float y, float fr_mm_s/*=0.0*/) {
1762
+void do_blocking_move_to_xy(const float &x, const float &y, const float &fr_mm_s/*=0.0*/) {
1763
   do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_s);
1763
   do_blocking_move_to(x, y, current_position[Z_AXIS], fr_mm_s);
1764
 }
1764
 }
1765
 
1765
 

Loading…
Cancel
Save