From a26e43b622f2ace14443206b3147853865ecdfe2 Mon Sep 17 00:00:00 2001
From: Mintpasokon <2518558815@qq.com>
Date: Mon, 3 Apr 2023 10:45:06 +0800
Subject: [PATCH] fix: thread_count failed to construct before g++11

---
 include/nanoflann.hpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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<unsigned int> thread_count = 0;
+            std::atomic<unsigned int> 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<unsigned int> thread_count = 0;
+            std::atomic<unsigned int> thread_count(0u);
             std::mutex                mutex;
             Base::root_node_ = this->divideTreeConcurrent(
                 *this, 0, Base::size_, Base::root_bbox_, thread_count, mutex);