Skip to content

Commit

Permalink
Fix build on c++98
Browse files Browse the repository at this point in the history
  • Loading branch information
fspindle committed Nov 6, 2024
1 parent cb7aea6 commit 24f0650
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions tutorial/imgproc/hough-transform/tutorial-circle-hough.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,15 @@ int main(int argc, char **argv)
hasToContinue = run_detection(I_src, I_disp, I_dispCanny, detector, opt_nbCirclesToDetect, false, opt_displayCanny);
vpTime::wait(40);
}

#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
delete dColor;
if (dCanny != nullptr) {
if (opt_displayCanny) {
delete dCanny;
}
}
#endif
}
//! [Manage video]
else {
Expand Down Expand Up @@ -558,14 +567,17 @@ int main(int argc, char **argv)
#endif

run_detection(I_src, I_disp, I_dispCanny, detector, opt_nbCirclesToDetect, true, opt_displayCanny);
//! [Manage single image]
}

#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
delete dColor;
if (dCanny != nullptr) {
delete dCanny;
}
delete dColor;
if (dCanny != nullptr) {
if (opt_displayCanny) {
delete dCanny;
}
}
#endif
//! [Manage single image]
}

return EXIT_SUCCESS;
}

0 comments on commit 24f0650

Please sign in to comment.