Merge pull request #6316 from sloriot/CGAL-boost_progress

Use non-deprecated API for boost progress
This commit is contained in:
Laurent Rineau 2022-02-22 18:24:47 +01:00
commit 6d28829737
3 changed files with 29 additions and 7 deletions

View File

@ -9,7 +9,14 @@
#include <utility>
#include <iostream>
#include <boost/version.hpp>
#if BOOST_VERSION < 107200
#include <boost/progress.hpp>
using boost::progress_display;
#else
#include <boost/timer/progress_display.hpp>
using boost::timer::progress_display;
#endif
namespace CGAL {
@ -118,9 +125,9 @@ class Constraints_loader {
std::cerr << " done (" << timer.time() << "s)\n";
std::cerr << "Inserting constraints...\n";
boost::progress_display show_progress(constraints.size(),
std::cerr,
"");
progress_display show_progress(constraints.size(),
std::cerr,
"");
timer.reset();
timer.start();
for(typename Constraints_container::const_iterator

View File

@ -9,7 +9,14 @@
#include <utility>
#include <iostream>
#include <boost/version.hpp>
#if BOOST_VERSION < 107200
#include <boost/progress.hpp>
using boost::progress_display;
#else
#include <boost/timer/progress_display.hpp>
using boost::timer::progress_display;
#endif
namespace CGAL {
@ -118,9 +125,9 @@ class Constraints_loader {
std::cerr << " done (" << timer.time() << "s)\n";
std::cerr << "Inserting constraints...\n";
boost::progress_display show_progress(constraints.size(),
std::cerr,
"");
progress_display show_progress(constraints.size(),
std::cerr,
"");
timer.reset();
timer.start();
for(typename Constraints_container::const_iterator

View File

@ -5,7 +5,15 @@
#include <CGAL/point_generators_3.h>
#include <CGAL/iterator.h>
#include <CGAL/Timer.h>
#include <boost/version.hpp>
#if BOOST_VERSION < 107200
#include <boost/progress.hpp>
using boost::progress_display;
#else
#include <boost/timer/progress_display.hpp>
using boost::timer::progress_display;
#endif
#include <CGAL/Orthogonal_k_neighbor_search.h>
#include <CGAL/K_neighbor_search.h>
@ -115,7 +123,7 @@ int main(int argc,char** argv)
double OK_tree=time.time();
time.reset();
boost::progress_display show_progress( nb_queries );
progress_display show_progress( nb_queries );
//running NN algorithms
for (std::vector<Point_3>::const_iterator it=queries.begin();it!=queries.end();++it)