Skip to content

Commit

Permalink
Further fixes for C++98
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFlt committed Aug 29, 2024
1 parent 1d438a7 commit 8e71f15
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions modules/tracker/me/src/moving-edges/vpMeSite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ std::vector<vpMeSite> &outputHypotheses, const unsigned numCandidates)

query.m_convlt = convolution_;
const double contrast = convolution_ / m_convlt;
candidates.insert({ fabs(1.0 - contrast), vpMeSiteHypothesis(&query, likelihood, contrast) });
candidates.insert(std::pair<double, vpMeSiteHypothesis>(fabs(1.0 - contrast), vpMeSiteHypothesis(&query, likelihood, contrast)));

Check warning on line 413 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L411-L413

Added lines #L411 - L413 were not covered by tests
}
}
else { // test on likelihood only
Expand All @@ -420,7 +420,7 @@ std::vector<vpMeSite> &outputHypotheses, const unsigned numCandidates)
const double convolution_ = query.convolution(I, &me);
const double likelihood = fabs(2 * convolution_);
query.m_convlt = convolution_;
candidates.insert({ -likelihood, vpMeSiteHypothesis(&query, likelihood, 0.0) });
candidates.insert(std::pair<double, vpMeSiteHypothesis>(-likelihood, vpMeSiteHypothesis(&query, likelihood, 0.0)));

Check warning on line 423 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L419-L423

Added lines #L419 - L423 were not covered by tests
}
}
// Take first numCandidates hypotheses: map is sorted according to the likelihood/contrast difference so we can just
Expand All @@ -437,14 +437,14 @@ std::vector<vpMeSite> &outputHypotheses, const unsigned numCandidates)

if (likelihood > threshold) {
if (contrast <= contrast_min || contrast >= contrast_max) {
outputHypotheses[i].m_state = vpMeSiteState::CONTRAST;
outputHypotheses[i].m_state = CONTRAST;

Check warning on line 440 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L440

Added line #L440 was not covered by tests
}
else {
outputHypotheses[i].m_state = vpMeSiteState::NO_SUPPRESSION;
outputHypotheses[i].m_state = NO_SUPPRESSION;

Check warning on line 443 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L443

Added line #L443 was not covered by tests
}
}
else {
outputHypotheses[i].m_state = vpMeSiteState::THRESHOLD;
outputHypotheses[i].m_state = THRESHOLD;

Check warning on line 447 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L447

Added line #L447 was not covered by tests
}
}
}
Expand All @@ -453,10 +453,10 @@ std::vector<vpMeSite> &outputHypotheses, const unsigned numCandidates)
outputHypotheses[i] = *(it->second.site);
const double likelihood = it->second.likelihood;

Check warning on line 454 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L453-L454

Added lines #L453 - L454 were not covered by tests
if (likelihood > threshold) {
outputHypotheses[i].m_state = vpMeSiteState::NO_SUPPRESSION;
outputHypotheses[i].m_state = NO_SUPPRESSION;

Check warning on line 456 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L456

Added line #L456 was not covered by tests
}
else {
outputHypotheses[i].m_state = vpMeSiteState::THRESHOLD;
outputHypotheses[i].m_state = THRESHOLD;

Check warning on line 459 in modules/tracker/me/src/moving-edges/vpMeSite.cpp

View check run for this annotation

Codecov / codecov/patch

modules/tracker/me/src/moving-edges/vpMeSite.cpp#L459

Added line #L459 was not covered by tests
}
}
}
Expand Down

0 comments on commit 8e71f15

Please sign in to comment.