Skip to content

Commit 309d2b8

Browse files
Remove broken argument registration in glomap
1 parent 262e122 commit 309d2b8

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

glomap/controllers/option_manager.cc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -286,11 +286,6 @@ void OptionManager::Reset() {
286286

287287
desc_ = std::make_shared<boost::program_options::options_description>();
288288

289-
options_bool_.clear();
290-
options_int_.clear();
291-
options_double_.clear();
292-
options_string_.clear();
293-
294289
added_mapper_options_ = false;
295290
added_view_graph_calibration_options_ = false;
296291
added_relative_pose_options_ = false;

glomap/controllers/option_manager.h

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,8 @@ class OptionManager {
7070
T* option,
7171
const std::string& help_text = "");
7272

73-
template <typename T>
74-
void RegisterOption(const std::string& name, const T* option);
75-
7673
std::shared_ptr<boost::program_options::options_description> desc_;
7774

78-
std::vector<std::pair<std::string, const bool*>> options_bool_;
79-
std::vector<std::pair<std::string, const int*>> options_int_;
80-
std::vector<std::pair<std::string, const double*>> options_double_;
81-
std::vector<std::pair<std::string, const std::string*>> options_string_;
82-
8375
bool added_database_options_ = false;
8476
bool added_image_options_ = false;
8577
bool added_mapper_options_ = false;
@@ -120,7 +112,6 @@ void OptionManager::AddAndRegisterRequiredOption(const std::string& name,
120112
desc_->add_options()(name.c_str(),
121113
boost::program_options::value<T>(option)->required(),
122114
help_text.c_str());
123-
RegisterOption(name, option);
124115
}
125116

126117
template <typename T>
@@ -131,23 +122,6 @@ void OptionManager::AddAndRegisterDefaultOption(const std::string& name,
131122
name.c_str(),
132123
boost::program_options::value<T>(option)->default_value(*option),
133124
help_text.c_str());
134-
RegisterOption(name, option);
135-
}
136-
137-
template <typename T>
138-
void OptionManager::RegisterOption(const std::string& name, const T* option) {
139-
if (std::is_same<T, bool>::value) {
140-
options_bool_.emplace_back(name, reinterpret_cast<const bool*>(option));
141-
} else if (std::is_same<T, int>::value) {
142-
options_int_.emplace_back(name, reinterpret_cast<const int*>(option));
143-
} else if (std::is_same<T, double>::value) {
144-
options_double_.emplace_back(name, reinterpret_cast<const double*>(option));
145-
} else if (std::is_same<T, std::string>::value) {
146-
options_string_.emplace_back(name,
147-
reinterpret_cast<const std::string*>(option));
148-
} else {
149-
LOG(ERROR) << "Unsupported option type: " << name;
150-
}
151125
}
152126

153127
} // namespace glomap

0 commit comments

Comments
 (0)