mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-03 04:10:54 +00:00
References are better for array args
This commit is contained in:
parent
125c572d97
commit
73e32925e4
13 changed files with 48 additions and 42 deletions
Marlin/src/module
|
@ -1193,7 +1193,7 @@ void Stepper::set_e_position(const long &e) {
|
|||
/**
|
||||
* Get a stepper's position in steps.
|
||||
*/
|
||||
long Stepper::position(AxisEnum axis) {
|
||||
long Stepper::position(const AxisEnum axis) {
|
||||
CRITICAL_SECTION_START;
|
||||
const long count_pos = count_position[axis];
|
||||
CRITICAL_SECTION_END;
|
||||
|
@ -1204,7 +1204,7 @@ long Stepper::position(AxisEnum axis) {
|
|||
* Get an axis position according to stepper position(s)
|
||||
* For CORE machines apply translation from ABC to XYZ.
|
||||
*/
|
||||
float Stepper::get_axis_position_mm(AxisEnum axis) {
|
||||
float Stepper::get_axis_position_mm(const AxisEnum axis) {
|
||||
float axis_steps;
|
||||
#if IS_CORE
|
||||
// Requesting one of the "core" axes?
|
||||
|
@ -1242,7 +1242,7 @@ void Stepper::quick_stop() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void Stepper::endstop_triggered(AxisEnum axis) {
|
||||
void Stepper::endstop_triggered(const AxisEnum axis) {
|
||||
|
||||
#if IS_CORE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue