Skip to content

v0.2.54..v0.2.55 changeset PoiPolygonTagIgnoreListReader.cpp

Garret Voltz edited this page Aug 14, 2020 · 1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonTagIgnoreListReader.cpp b/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonTagIgnoreListReader.cpp
index be5acef..b3412d6 100644
--- a/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonTagIgnoreListReader.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/conflate/poi-polygon/PoiPolygonTagIgnoreListReader.cpp
@@ -22,7 +22,7 @@
  * This will properly maintain the copyright information. DigitalGlobe
  * copyrights will be updated automatically.
  *
- * @copyright Copyright (C) 2017, 2018, 2019 DigitalGlobe (http://www.digitalglobe.com/)
+ * @copyright Copyright (C) 2017, 2018, 2019, 2020 DigitalGlobe (http://www.digitalglobe.com/)
  */
 #include "PoiPolygonTagIgnoreListReader.h"
 
@@ -34,8 +34,6 @@
 namespace hoot
 {
 
-std::shared_ptr<PoiPolygonTagIgnoreListReader> PoiPolygonTagIgnoreListReader::_theInstance;
-
 PoiPolygonTagIgnoreListReader::PoiPolygonTagIgnoreListReader()
 {
   LOG_DEBUG("Reading ignore lists...");
@@ -49,11 +47,9 @@ PoiPolygonTagIgnoreListReader::PoiPolygonTagIgnoreListReader()
 
 PoiPolygonTagIgnoreListReader& PoiPolygonTagIgnoreListReader::getInstance()
 {
-  if (!_theInstance.get())
-  {
-    _theInstance.reset(new PoiPolygonTagIgnoreListReader());
-  }
-  return *_theInstance;
+  //  Local static singleton instance
+  static PoiPolygonTagIgnoreListReader instance;
+  return instance;
 }
 
 }
Clone this wiki locally