Browse Source

don't pass integer by reference, inefficient. (PR#2547)

Andrew Lenharth 9 years ago
parent
commit
a0ae9e30df
2 changed files with 4 additions and 4 deletions
  1. 2
    2
      Marlin/planner.cpp
  2. 2
    2
      Marlin/planner.h

+ 2
- 2
Marlin/planner.cpp View File

@@ -473,9 +473,9 @@ float junction_deviation = 0.1;
473 473
 // mm. Microseconds specify how many microseconds the move should take to perform. To aid acceleration
474 474
 // calculation the caller must also provide the physical length of the line in millimeters.
475 475
 #if defined(ENABLE_AUTO_BED_LEVELING) || defined(MESH_BED_LEVELING)
476
-  void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder)
476
+  void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t extruder)
477 477
 #else
478
-  void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder)
478
+  void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t extruder)
479 479
 #endif  // ENABLE_AUTO_BED_LEVELING
480 480
 {
481 481
   // Calculate the buffer head after we push this byte

+ 2
- 2
Marlin/planner.h View File

@@ -97,7 +97,7 @@ FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block
97 97
    * Add a new linear movement to the buffer. x, y, z are the signed, absolute target position in
98 98
    * millimeters. Feed rate specifies the (target) speed of the motion.
99 99
    */
100
-  void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t &extruder);
100
+  void plan_buffer_line(float x, float y, float z, const float &e, float feed_rate, const uint8_t extruder);
101 101
 
102 102
   /**
103 103
    * Set the planner positions. Used for G92 instructions.
@@ -108,7 +108,7 @@ FORCE_INLINE uint8_t movesplanned() { return BLOCK_MOD(block_buffer_head - block
108 108
 
109 109
 #else
110 110
 
111
-  void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t &extruder);
111
+  void plan_buffer_line(const float &x, const float &y, const float &z, const float &e, float feed_rate, const uint8_t extruder);
112 112
   void plan_set_position(const float &x, const float &y, const float &z, const float &e);
113 113
 
114 114
 #endif // ENABLE_AUTO_BED_LEVELING || MESH_BED_LEVELING

Loading…
Cancel
Save