Skip to content

Commit

Permalink
perf(yabloc): fix performance warning of iterateByValue (#6929)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryuta Kambe <[email protected]>
  • Loading branch information
veqcc authored May 8, 2024
1 parent 6d00269 commit 6ba26e5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ cv::Mat ProjectorModule::project_image(const cv::Mat & mask_image)
cv::findContours(masks[i], contours, cv::RETR_LIST, cv::CHAIN_APPROX_NONE);

std::vector<std::vector<cv::Point> > projected_contours;
for (auto contour : contours) {
for (const auto & contour : contours) {
std::vector<cv::Point> projected;
for (auto c : contour) {
for (const auto & c : contour) {
auto opt = project_func_(c);
if (!opt.has_value()) continue;

Expand Down

0 comments on commit 6ba26e5

Please sign in to comment.