v0.2.54..v0.2.55 changeset OsmChangeWriterFactory.cpp
Garret Voltz edited this page Aug 14, 2020
·
1 revision
diff --git a/hoot-core/src/main/cpp/hoot/core/io/OsmChangeWriterFactory.cpp b/hoot-core/src/main/cpp/hoot/core/io/OsmChangeWriterFactory.cpp
index aae6f6f..17e9c78 100644
--- a/hoot-core/src/main/cpp/hoot/core/io/OsmChangeWriterFactory.cpp
+++ b/hoot-core/src/main/cpp/hoot/core/io/OsmChangeWriterFactory.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 "OsmChangeWriterFactory.h"
@@ -36,19 +36,11 @@ using namespace std;
namespace hoot
{
-std::shared_ptr<OsmChangeWriterFactory> OsmChangeWriterFactory::_theInstance;
-
-OsmChangeWriterFactory::OsmChangeWriterFactory()
-{
-}
-
OsmChangeWriterFactory& OsmChangeWriterFactory::getInstance()
{
- if (!_theInstance.get())
- {
- _theInstance.reset(new OsmChangeWriterFactory());
- }
- return *_theInstance;
+ // Local static singleton instance
+ static OsmChangeWriterFactory instance;
+ return instance;
}
std::shared_ptr<OsmChangeWriter> OsmChangeWriterFactory::createWriter(