Atomics can't be initialized in initializer list

This commit is contained in:
Clement Jamin 2014-07-08 17:55:55 +02:00
parent e5c89d7139
commit 1946b4fecd
1 changed files with 7 additions and 4 deletions

View File

@ -191,10 +191,12 @@ public:
#ifdef CGAL_MESH_3_PERTURBER_VERBOSE
, counter_(0)
, timer_()
, total_counter_(0)
, total_time_(0)
#endif
{}
{
// Initialized here in case it's some tbb::atomic
total_counter_ = 0;
total_time_ = 0;
}
/**
* @brief destructor
@ -337,7 +339,8 @@ public:
int counter() const { return counter_; }
double time() const { return timer().time(); }
int total_counter() const { return total_counter_ + counter(); }
std::size_t total_time() const { return total_time_ + 1000*time(); }
std::size_t total_time() const
{ return static_cast<std::size_t>(total_time_ + 1000*time()); }
virtual std::string perturbation_name() const = 0;
private:
CGAL::Timer &timer() const