Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix simple warnings #125

Merged
merged 2 commits into from
Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions include/OsqpEigen/Solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace OsqpEigen
*/
class Solver
{
bool m_isSolverInitialized; /**< Boolean true if solver is initialized. */
std::unique_ptr<OSQPWorkspace, std::function<void(OSQPWorkspace *)>> m_workspace; /**< Pointer to OSQPWorkspace struct. */
std::unique_ptr<OsqpEigen::Settings> m_settings; /**< Pointer to Settings class. */
std::unique_ptr<OsqpEigen::Data> m_data; /**< Pointer to Data class. */
Expand All @@ -48,10 +49,6 @@ namespace OsqpEigen
std::vector<Eigen::Triplet<c_float>> m_oldHessianTriplet, m_newHessianTriplet, m_newUpperTriangularHessianTriplets;
std::vector<Eigen::Triplet<c_float>> 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;
Expand Down
4 changes: 2 additions & 2 deletions src/Data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down