diff --git a/include/nanoflann.hpp b/include/nanoflann.hpp index e5d86487..305b25a4 100644 --- a/include/nanoflann.hpp +++ b/include/nanoflann.hpp @@ -1556,7 +1556,7 @@ class KDTreeSingleIndexAdaptor } else { - std::atomic thread_count = 0; + std::atomic thread_count(0u); std::mutex mutex; Base::root_node_ = this->divideTreeConcurrent( *this, 0, Base::size_, Base::root_bbox_, thread_count, mutex); @@ -1992,7 +1992,7 @@ class KDTreeSingleIndexDynamicAdaptor_ } else { - std::atomic thread_count = 0; + std::atomic thread_count(0u); std::mutex mutex; Base::root_node_ = this->divideTreeConcurrent( *this, 0, Base::size_, Base::root_bbox_, thread_count, mutex);