// Render help text into a map of group-name to a list of (option, help)
// pairs.
- using helpmap_ty = std::map<std::string, std::vector<OptionInfo>>;
- helpmap_ty GroupedOptionHelp;
+ std::map<std::string, std::vector<OptionInfo>> GroupedOptionHelp;
for (unsigned Id = 1, e = getNumOptions() + 1; Id != e; ++Id) {
// FIXME: Split out option groups.
}
}
- for (helpmap_ty::iterator it = GroupedOptionHelp .begin(),
- ie = GroupedOptionHelp.end(); it != ie; ++it) {
- if (it != GroupedOptionHelp .begin())
+ for (auto& OptionGroup : GroupedOptionHelp) {
+ if (OptionGroup.first != GroupedOptionHelp.begin()->first)
OS << "\n";
- PrintHelpOptionList(OS, it->first, it->second);
+ PrintHelpOptionList(OS, OptionGroup.first, OptionGroup.second);
}
OS.flush();