diff --git a/src/optimization/SwerveTrajoptUtil.h b/src/optimization/SwerveTrajoptUtil.h index fcf00fb0..9f355e8a 100644 --- a/src/optimization/SwerveTrajoptUtil.h +++ b/src/optimization/SwerveTrajoptUtil.h @@ -33,7 +33,7 @@ void ApplyKinematicsConstraints( const std::vector<Expr>& vy, const std::vector<Expr>& omega, const std::vector<Expr>& ax, const std::vector<Expr>& ay, const std::vector<Expr>& alpha, const std::vector<Expr>& dt, - const std::vector<size_t> N); + const std::vector<size_t>& N); /** * Applies the drivetrain-specific constraints to the optimizer. These diff --git a/src/optimization/SwerveTrajoptUtil.inc b/src/optimization/SwerveTrajoptUtil.inc index b5ba7dfd..2d0f3c91 100644 --- a/src/optimization/SwerveTrajoptUtil.inc +++ b/src/optimization/SwerveTrajoptUtil.inc @@ -59,7 +59,7 @@ void ApplyKinematicsConstraints( const std::vector<Expr>& vy, const std::vector<Expr>& omega, const std::vector<Expr>& ax, const std::vector<Expr>& ay, const std::vector<Expr>& alpha, const std::vector<Expr>& dt, - const std::vector<size_t> N) { + const std::vector<size_t>& N) { size_t wptCnt = N.size() + 1; for (size_t wptIdx = 1; wptIdx < wptCnt; ++wptIdx) {