| 572 | } |
| 573 | |
| 574 | void ArgsManager::AddArg(const std::string& name, const std::string& help, const bool debug_only, const OptionsCategory& cat) |
| 575 | { |
| 576 | // Split arg name from its help param |
| 577 | size_t eq_index = name.find('='); |
| 578 | if (eq_index == std::string::npos) { |
| 579 | eq_index = name.size(); |
| 580 | } |
| 581 | |
| 582 | std::map<std::string, Arg>& arg_map = m_available_args[cat]; |
| 583 | auto ret = arg_map.emplace(name.substr(0, eq_index), Arg(name.substr(eq_index, name.size() - eq_index), help, debug_only)); |
| 584 | assert(ret.second); // Make sure an insertion actually happened |
| 585 | } |
| 586 | |
| 587 | void ArgsManager::AddHiddenArgs(const std::vector<std::string>& names) |
| 588 | { |