diff --git a/trajopt_sco/src/osqp_interface.cpp b/trajopt_sco/src/osqp_interface.cpp index 5241ed1b..9e3ad3a5 100644 --- a/trajopt_sco/src/osqp_interface.cpp +++ b/trajopt_sco/src/osqp_interface.cpp @@ -213,8 +213,8 @@ bool OSQPModel::updateConstraints() void OSQPModel::createOrUpdateSolver() { - bool P_sparsity_equal = updateObjective(); - bool A_sparsity_equal = updateConstraints(); + const bool P_sparsity_equal = updateObjective(); + const bool A_sparsity_equal = updateConstraints(); // If sparsity did not change, update data, otherwise cleanup and setup bool need_setup = true;