From 11104f177b4613982268d162f0e868a1850951f1 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 9 May 2017 12:36:37 -0500 Subject: [PATCH] Apply const in BABYSTEPPING --- Marlin/temperature.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Marlin/temperature.cpp b/Marlin/temperature.cpp index 8193d3c964..94c1e4a586 100644 --- a/Marlin/temperature.cpp +++ b/Marlin/temperature.cpp @@ -2045,15 +2045,14 @@ void Temperature::isr() { #if ENABLED(BABYSTEPPING) LOOP_XYZ(axis) { - int curTodo = babystepsTodo[axis]; //get rid of volatile for performance - + const int curTodo = babystepsTodo[axis]; // get rid of volatile for performance if (curTodo > 0) { - stepper.babystep((AxisEnum)axis,/*fwd*/true); - babystepsTodo[axis]--; //fewer to do next time + stepper.babystep((AxisEnum)axis, /*fwd*/true); + babystepsTodo[axis]--; } else if (curTodo < 0) { - stepper.babystep((AxisEnum)axis,/*fwd*/false); - babystepsTodo[axis]++; //fewer to do next time + stepper.babystep((AxisEnum)axis, /*fwd*/false); + babystepsTodo[axis]++; } } #endif // BABYSTEPPING