From 514b4eeee670e35e7d34bd3633f345bfdafd84b5 Mon Sep 17 00:00:00 2001 From: Kunal Shah Date: Mon, 8 Aug 2022 10:47:47 -0700 Subject: [PATCH 1/2] fix -Wreorder --- include/OsqpEigen/Solver.hpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/include/OsqpEigen/Solver.hpp b/include/OsqpEigen/Solver.hpp index e71f9ff..fa89e8a 100644 --- a/include/OsqpEigen/Solver.hpp +++ b/include/OsqpEigen/Solver.hpp @@ -31,6 +31,7 @@ namespace OsqpEigen */ class Solver { + bool m_isSolverInitialized; /**< Boolean true if solver is initialized. */ std::unique_ptr> m_workspace; /**< Pointer to OSQPWorkspace struct. */ std::unique_ptr m_settings; /**< Pointer to Settings class. */ std::unique_ptr m_data; /**< Pointer to Data class. */ @@ -48,10 +49,6 @@ namespace OsqpEigen std::vector> m_oldHessianTriplet, m_newHessianTriplet, m_newUpperTriangularHessianTriplets; std::vector> m_oldLinearConstraintsTriplet, m_newLinearConstraintsTriplet; - - - bool m_isSolverInitialized; /**< Boolean true if solver is initialized. */ - /** * Evaluate the position and the values of the new elements of a sparse matrix. * @param oldMatrixTriplet vector containing the triplets of the old sparse matrix; From c5821ff09e185bba860e46e95cc0f2ca5ed4e2a7 Mon Sep 17 00:00:00 2001 From: Kunal Shah Date: Mon, 8 Aug 2022 13:09:59 -0700 Subject: [PATCH 2/2] fix parentheses warning --- src/Data.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data.cpp b/src/Data.cpp index 5268a65..6dfc7dc 100644 --- a/src/Data.cpp +++ b/src/Data.cpp @@ -88,9 +88,9 @@ OSQPData* const & OsqpEigen::Data::getData() const bool OsqpEigen::Data::isSet() const { const bool areConstraintsOk = (m_data->m == 0) || - m_isLinearConstraintsMatrixSet && + (m_isLinearConstraintsMatrixSet && m_isLowerBoundSet && - m_isUpperBoundSet; + m_isUpperBoundSet); return m_isNumberOfVariablesSet && m_isNumberOfConstraintsSet &&