diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 63d140d..1e16274 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -2776,18 +2776,18 @@ Options::help_one_group(const std::string& g) const { using OptionHelp = std::vector>; + String result; + auto group = m_help.find(g); if (group == m_help.end()) { - return ""; + return result; } OptionHelp format; std::size_t longest = 0; - String result; - if (!g.empty()) { result += toLocalString(" " + g + " options:\n");