Skip to content

Commit

Permalink
clean search log in debug
Browse files Browse the repository at this point in the history
  • Loading branch information
supermerill committed Jun 27, 2024
1 parent e3aff18 commit 39f3866
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/slic3r/GUI/Search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,36 +584,13 @@ const Option& OptionsSearcher::get_option(const std::string& opt_key, Preset::Ty
size_t pos_hash = opt_key.find('#');
if (pos_hash == std::string::npos) {
auto it = std::lower_bound(options.begin(), options.end(), Option({ boost::nowide::widen(opt_key), type, idx }));
#ifdef _DEBUG
if (options[it - options.begin()].opt_key_with_idx() != opt_key) {
std::wstring wopt_key = boost::nowide::widen(opt_key);
for (const Option &opt : options) {
if (opt.key == wopt_key) {
if (opt.type == type) {
std::cout << "found\n";
}
}
}
}
#endif
assert(it != options.end());
return options[it - options.begin()];
} else {
std::string raw_opt_key = opt_key.substr(0, pos_hash);
std::string opt_idx = opt_key.substr(pos_hash + 1);
idx = atoi(opt_idx.c_str());
auto it = std::lower_bound(options.begin(), options.end(), Option({ boost::nowide::widen(raw_opt_key), type, idx }));
#ifdef _DEBUG
if (options[it - options.begin()].opt_key_with_idx() != opt_key) {
for (const Option &opt : options) {
if (opt.opt_key_with_idx() == opt_key) {
if (opt.type == type) {
std::cout << "found\n";
}
}
}
}
#endif
assert(it != options.end());
return options[it - options.begin()];
}
Expand Down

0 comments on commit 39f3866

Please sign in to comment.