Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Armstrong committed Nov 27, 2023
1 parent 95660ac commit 609ddb1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion trajopt_sco/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ if(HAVE_BPMPD)
target_link_libraries(bpmpd_caller ${BPMPD_LIBRARY} -static)
target_compile_definitions(bpmpd_caller PUBLIC BPMPD_WORKING_DIR="${CMAKE_CURRENT_BINARY_DIR}")
target_cxx_version(bpmpd_caller PUBLIC VERSION ${TRAJOPT_CXX_VERSION})
target_compile_options(bpmpd_caller PUBLIC -std=c++${TRAJOPT_CXX_VERSION})
target_include_directories(bpmpd_caller PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include>")
target_include_directories(bpmpd_caller SYSTEM
Expand Down
10 changes: 5 additions & 5 deletions trajopt_sco/src/bpmpd_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,23 +234,23 @@ BPMPDModel::BPMPDModel()

Var BPMPDModel::addVar(const std::string& name)
{
std::scoped_lock lock(m_mutex);
std::lock_guard<std::mutex> lock(m_mutex);
m_vars.push_back(std::make_shared<VarRep>(m_vars.size(), name, this));
m_lbs.push_back(-BPMPD_BIG);
m_ubs.push_back(BPMPD_BIG);
return m_vars.back();
}
Cnt BPMPDModel::addEqCnt(const AffExpr& expr, const std::string& /*name*/)
{
std::scoped_lock lock(m_mutex);
std::lock_guard<std::mutex> lock(m_mutex);
m_cnts.push_back(std::make_shared<CntRep>(m_cnts.size(), this));
m_cntExprs.push_back(expr);
m_cntTypes.push_back(EQ);
return m_cnts.back();
}
Cnt BPMPDModel::addIneqCnt(const AffExpr& expr, const std::string& /*name*/)
{
std::scoped_lock lock(m_mutex);
std::lock_guard<std::mutex> lock(m_mutex);
m_cnts.push_back(std::make_shared<CntRep>(m_cnts.size(), this));
m_cntExprs.push_back(expr);
m_cntTypes.push_back(INEQ);
Expand All @@ -263,7 +263,7 @@ Cnt BPMPDModel::addIneqCnt(const QuadExpr&, const std::string& /*name*/)

void BPMPDModel::removeVars(const VarVector& vars)
{
std::scoped_lock lock(m_mutex);
std::lock_guard<std::mutex> lock(m_mutex);
SizeTVec inds;
vars2inds(vars, inds);
for (const auto& var : vars)
Expand All @@ -272,7 +272,7 @@ void BPMPDModel::removeVars(const VarVector& vars)

void BPMPDModel::removeCnts(const CntVector& cnts)
{
std::scoped_lock lock(m_mutex);
std::lock_guard<std::mutex> lock(m_mutex);
SizeTVec inds;
cnts2inds(cnts, inds);
for (auto& cnt : cnts) // NOLINT
Expand Down

0 comments on commit 609ddb1

Please sign in to comment.