References are better for array args

This commit is contained in:
Scott Lahteine
2017-12-09 02:10:54 -06:00
parent 125c572d97
commit 73e32925e4
13 changed files with 48 additions and 42 deletions

View File

@@ -27,7 +27,7 @@
#include "../../module/motion.h"
#include "../../module/planner_bezier.h"
void plan_cubic_move(const float offset[4]) {
void plan_cubic_move(const float (&offset)[4]) {
cubic_b_spline(current_position, destination, offset, MMS_SCALED(feedrate_mm_s), active_extruder);
// As far as the parser is concerned, the position is now == destination. In reality the
@@ -62,7 +62,7 @@ void GcodeSuite::G5() {
get_destination_from_command();
const float offset[] = {
const float offset[4] = {
parser.linearval('I'),
parser.linearval('J'),
parser.linearval('P'),