From d3af98b2d7ca990c2b37a07616adec1817992242 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joan=20Sol=C3=A0?= <jsola@iri.upc.edu>
Date: Wed, 10 Jun 2020 15:01:11 +0200
Subject: [PATCH] Remove get() from calls to Factories

---
 demos/demo_wolf_factories.cpp                        | 4 ++--
 src/landmark/landmark_ahp.cpp                        | 2 +-
 src/landmark/landmark_hp.cpp                         | 2 +-
 src/yaml/processor_bundle_adjustment_yaml.cpp        | 2 +-
 src/yaml/processor_image_yaml.cpp                    | 4 ++--
 src/yaml/processor_tracker_feature_trifocal_yaml.cpp | 2 +-
 src/yaml/sensor_camera_yaml.cpp                      | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/demos/demo_wolf_factories.cpp b/demos/demo_wolf_factories.cpp
index ddd2d26a7..1bca72e7f 100644
--- a/demos/demo_wolf_factories.cpp
+++ b/demos/demo_wolf_factories.cpp
@@ -59,8 +59,8 @@ int main(void)
     cout << "\n================== ParamsSensor Factory ===================" << endl;
 
     // Use params factory for camera intrinsics
-    ParamsSensorBasePtr intr_cam_ptr = ParamsSensorFactory::get().create("CAMERA", wolf_config + "/camera_params_ueye_sim.yaml");
-    ProcessorParamsBasePtr params_ptr = ProcessorParamsFactory::get().create("IMAGE FEATURE", wolf_config + "/processor_image_feature.yaml");
+    ParamsSensorBasePtr intr_cam_ptr = ParamsSensorFactory::create("CAMERA", wolf_config + "/camera_params_ueye_sim.yaml");
+    ProcessorParamsBasePtr params_ptr = ProcessorParamsFactory::create("IMAGE FEATURE", wolf_config + "/processor_image_feature.yaml");
 
     cout << "CAMERA with intrinsics      : " << (static_pointer_cast<ParamsSensorCamera>(intr_cam_ptr))->pinhole_model_raw.transpose() << endl;
 //    cout << "Processor IMAGE image width : " << (static_pointer_cast<ProcessorParamsImage>(params_ptr))->image.width << endl;
diff --git a/src/landmark/landmark_ahp.cpp b/src/landmark/landmark_ahp.cpp
index 6b72f7532..74dfb2891 100644
--- a/src/landmark/landmark_ahp.cpp
+++ b/src/landmark/landmark_ahp.cpp
@@ -70,7 +70,7 @@ LandmarkBasePtr LandmarkAhp::create(const YAML::Node& _node)
 // Register landmark creator
 namespace
 {
-const bool WOLF_UNUSED registered_lmk_ahp = FactoryLandmark::get().registerCreator("LandmarkAhp", LandmarkAhp::create);
+const bool WOLF_UNUSED registered_lmk_ahp = FactoryLandmark::registerCreator("LandmarkAhp", LandmarkAhp::create);
 }
 
 } // namespace wolf
diff --git a/src/landmark/landmark_hp.cpp b/src/landmark/landmark_hp.cpp
index 943209c83..d5e454fca 100644
--- a/src/landmark/landmark_hp.cpp
+++ b/src/landmark/landmark_hp.cpp
@@ -56,7 +56,7 @@ LandmarkBasePtr LandmarkHp::create(const YAML::Node& _node)
 // Register landmark creator
 namespace
 {
-const bool WOLF_UNUSED registered_lmk_hp = FactoryLandmark::get().registerCreator("LandmarkHp", LandmarkHp::create);
+const bool WOLF_UNUSED registered_lmk_hp = FactoryLandmark::registerCreator("LandmarkHp", LandmarkHp::create);
 }
 
 } // namespace wolf
diff --git a/src/yaml/processor_bundle_adjustment_yaml.cpp b/src/yaml/processor_bundle_adjustment_yaml.cpp
index 82680274b..6fc78f420 100644
--- a/src/yaml/processor_bundle_adjustment_yaml.cpp
+++ b/src/yaml/processor_bundle_adjustment_yaml.cpp
@@ -64,7 +64,7 @@ static ParamsProcessorBasePtr createParamsProcessorBundleAdjustment(const std::s
 }
 
 // Register in the FactorySensor
-const bool WOLF_UNUSED registered_prc_bundle_adjustment = FactoryParamsProcessor::get().registerCreator("ProcessorBundleAdjustment", createParamsProcessorBundleAdjustment);
+const bool WOLF_UNUSED registered_prc_bundle_adjustment = FactoryParamsProcessor::registerCreator("ProcessorBundleAdjustment", createParamsProcessorBundleAdjustment);
 
 } // namespace [unnamed]
 
diff --git a/src/yaml/processor_image_yaml.cpp b/src/yaml/processor_image_yaml.cpp
index 7c150215c..f6ead0c6b 100644
--- a/src/yaml/processor_image_yaml.cpp
+++ b/src/yaml/processor_image_yaml.cpp
@@ -63,8 +63,8 @@ static ParamsProcessorBasePtr createParamsProcessorImage(const std::string & _fi
 }
 
 // Register in the FactorySensor
-const bool WOLF_UNUSED registered_prc_image_feature_par = FactoryParamsProcessor::get().registerCreator("ProcessorTrackerFeatureImage", createParamsProcessorImage);
-const bool WOLF_UNUSED registered_prc_image_landmark_par = FactoryParamsProcessor::get().registerCreator("ProcessorTrackerLandmarkImage", createParamsProcessorImage);
+const bool WOLF_UNUSED registered_prc_image_feature_par = FactoryParamsProcessor::registerCreator("ProcessorTrackerFeatureImage", createParamsProcessorImage);
+const bool WOLF_UNUSED registered_prc_image_landmark_par = FactoryParamsProcessor::registerCreator("ProcessorTrackerLandmarkImage", createParamsProcessorImage);
 
 }
 }
diff --git a/src/yaml/processor_tracker_feature_trifocal_yaml.cpp b/src/yaml/processor_tracker_feature_trifocal_yaml.cpp
index 21ca4d7a5..f9238365f 100644
--- a/src/yaml/processor_tracker_feature_trifocal_yaml.cpp
+++ b/src/yaml/processor_tracker_feature_trifocal_yaml.cpp
@@ -66,7 +66,7 @@ static ParamsProcessorBasePtr createParamsProcessorTrackerFeatureTrifocal(const
 }
 
 // Register in the FactorySensor
-const bool WOLF_UNUSED registered_prc_trifocal = FactoryParamsProcessor::get().registerCreator("ProcessorTrackerFeatureTrifocal", createParamsProcessorTrackerFeatureTrifocal);
+const bool WOLF_UNUSED registered_prc_trifocal = FactoryParamsProcessor::registerCreator("ProcessorTrackerFeatureTrifocal", createParamsProcessorTrackerFeatureTrifocal);
 
 } // namespace [unnamed]
 
diff --git a/src/yaml/sensor_camera_yaml.cpp b/src/yaml/sensor_camera_yaml.cpp
index 848010e01..d06e952fe 100644
--- a/src/yaml/sensor_camera_yaml.cpp
+++ b/src/yaml/sensor_camera_yaml.cpp
@@ -106,7 +106,7 @@ static ParamsSensorBasePtr createParamsSensorCamera(const std::string & _filenam
 }
 
 // Register in the FactorySensor
-const bool WOLF_UNUSED registered_camera_intr = FactoryParamsSensor::get().registerCreator("SensorCamera", createParamsSensorCamera);
+const bool WOLF_UNUSED registered_camera_intr = FactoryParamsSensor::registerCreator("SensorCamera", createParamsSensorCamera);
 
 } // namespace [unnamed]
 
-- 
GitLab