From 011cc220b835615a0c7a5b7853ee54ebdda48b6b Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Thu, 15 Feb 2024 15:09:47 -0600 Subject: [PATCH] Fixup --- .../trajopt_sqp/include/trajopt_sqp/sqp_callback.h | 2 ++ trajopt_optimizers/trajopt_sqp/src/ifopt_qp_problem.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/trajopt_optimizers/trajopt_sqp/include/trajopt_sqp/sqp_callback.h b/trajopt_optimizers/trajopt_sqp/include/trajopt_sqp/sqp_callback.h index 5510c6520..6702bdd24 100644 --- a/trajopt_optimizers/trajopt_sqp/include/trajopt_sqp/sqp_callback.h +++ b/trajopt_optimizers/trajopt_sqp/include/trajopt_sqp/sqp_callback.h @@ -40,6 +40,8 @@ class SQPCallback using Ptr = std::shared_ptr; using ConstPtr = std::shared_ptr; + virtual ~SQPCallback() = default; + /** * @brief This is the function called during the SQP * @param nlp The ifopt::Problem being optimized diff --git a/trajopt_optimizers/trajopt_sqp/src/ifopt_qp_problem.cpp b/trajopt_optimizers/trajopt_sqp/src/ifopt_qp_problem.cpp index 99d6e5e00..f049ddf18 100644 --- a/trajopt_optimizers/trajopt_sqp/src/ifopt_qp_problem.cpp +++ b/trajopt_optimizers/trajopt_sqp/src/ifopt_qp_problem.cpp @@ -429,7 +429,7 @@ double IfoptQPProblem::evaluateTotalConvexCost(const Eigen::Ref& var_vals) { if (num_nlp_costs_ == 0) - return Eigen::VectorXd(); + return {}; auto var_block = var_vals.head(num_nlp_vars_); Eigen::VectorXd result_quad = var_block.transpose() * hessian_.block(0, 0, num_nlp_vars_, num_nlp_vars_) * var_block; @@ -445,7 +445,7 @@ double IfoptQPProblem::evaluateTotalExactCost(const Eigen::Ref& var_vals) { if (!nlp_->HasCostTerms()) - return Eigen::VectorXd(); + return {}; nlp_->SetVariables(var_vals.data()); return nlp_->GetCosts().GetValues();