Skip to content
Snippets Groups Projects
Commit 88749f7c authored by Ilias Harkati's avatar Ilias Harkati
Browse files

fix compiler warnings

parent b1601f95
No related branches found
No related tags found
No related merge requests found
Pipeline #41628 passed with warnings
...@@ -1279,7 +1279,7 @@ bool StatesPathFinder::saveIncompatibleRHS(ConstraintMap_t& pairMap, ...@@ -1279,7 +1279,7 @@ bool StatesPathFinder::saveIncompatibleRHS(ConstraintMap_t& pairMap,
// indices of their respective constraints // indices of their respective constraints
exploreJOC = [&](core::JointConstPtr_t j, jointOfConstraint current, exploreJOC = [&](core::JointConstPtr_t j, jointOfConstraint current,
int initial) { int initial) {
int constraint_index = std::get<1>(current); size_t constraint_index = std::get<1>(current);
visited[constraint_index]++; visited[constraint_index]++;
core::JointConstPtr_t current_joint = std::get<0>(current); core::JointConstPtr_t current_joint = std::get<0>(current);
auto iconstraint = constraints_[constraint_index]; auto iconstraint = constraints_[constraint_index];
...@@ -1287,14 +1287,14 @@ bool StatesPathFinder::saveIncompatibleRHS(ConstraintMap_t& pairMap, ...@@ -1287,14 +1287,14 @@ bool StatesPathFinder::saveIncompatibleRHS(ConstraintMap_t& pairMap,
auto id_cj = core::RelativeMotion::idx(current_joint); auto id_cj = core::RelativeMotion::idx(current_joint);
for (auto& joc : JOCs) { for (auto& joc : JOCs) {
int ci = std::get<1>(joc); size_t ci = std::get<1>(joc);
core::JointConstPtr_t ji = std::get<0>(joc); core::JointConstPtr_t ji = std::get<0>(joc);
auto id_ji = core::RelativeMotion::idx(ji); auto id_ji = core::RelativeMotion::idx(ji);
if (m(id_cj, id_ji) == if (m(id_cj, id_ji) ==
core::RelativeMotion::RelativeMotionType::Unconstrained) core::RelativeMotion::RelativeMotionType::Unconstrained)
continue; continue;
if (equalJoints(ji, j)) if (equalJoints(ji, j))
return std::vector<int>{initial, ci}; return std::vector<int>{initial, (int)ci};
else if (visited[ci] < 2) { else if (visited[ci] < 2) {
return exploreJOC(j, joc, initial); return exploreJOC(j, joc, initial);
} }
...@@ -1303,10 +1303,10 @@ bool StatesPathFinder::saveIncompatibleRHS(ConstraintMap_t& pairMap, ...@@ -1303,10 +1303,10 @@ bool StatesPathFinder::saveIncompatibleRHS(ConstraintMap_t& pairMap,
}; };
// get the indices of the constraints associated to the two joints // get the indices of the constraints associated to the two joints
auto getIndices = [&] -> std::vector<int> { auto getIndices = [&]() -> std::vector<int> {
for (auto& joc : constraints_j1) { for (auto& joc : constraints_j1) {
visited[std::get<1>(joc)] = 1; visited[std::get<1>(joc)] = 1;
auto indices = exploreJOC(j2, joc, std::get<1>(joc)); auto indices = exploreJOC(j2, joc, (int)std::get<1>(joc));
if (indices[0] >= 0 || indices[1] >= 0) return indices; if (indices[0] >= 0 || indices[1] >= 0) return indices;
} }
return std::vector<int>{-1, -1}; return std::vector<int>{-1, -1};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment