Skip to content

Commit

Permalink
Merge pull request #236 from jalegido/boost-1.83
Browse files Browse the repository at this point in the history
compatibility boost >= 1.83
  • Loading branch information
diogomart authored May 7, 2024
2 parents 350bb7f + 4a7935e commit 912b51b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/lib/parallel_progress.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,14 @@
#ifndef VINA_PARALLEL_PROGRESS_H
#define VINA_PARALLEL_PROGRESS_H

#include <boost/version.hpp>
#if BOOST_VERSION < 107200
#include <boost/progress.hpp>
typedef boost::progress_display boost_progress;
#else
#include <boost/timer/progress_display.hpp>
typedef boost::timer::progress_display boost_progress;
#endif
#include <boost/thread/mutex.hpp>

#include <functional>
Expand All @@ -34,7 +41,7 @@ struct parallel_progress : public incrementable {
parallel_progress(std::function<void(double)>* c = NULL) : p(NULL), callback(c) {}
void init(unsigned long n) {
count = n;
p = new boost::progress_display(count);
p = new boost_progress(count);
}
void operator++() {
if(p) {
Expand All @@ -47,7 +54,7 @@ struct parallel_progress : public incrementable {
virtual ~parallel_progress() { delete p; }
private:
boost::mutex self;
boost::progress_display* p;
boost_progress* p;
std::function<void(double)>* callback;
unsigned long count;
};
Expand Down

0 comments on commit 912b51b

Please sign in to comment.