From a525bb1eefd63c1af0810eecac5fa5a47b13978c Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Sun, 26 Oct 2014 19:18:41 +0100 Subject: [PATCH] Add an eol between each option groups --- src/cxxopts.hpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cxxopts.hpp b/src/cxxopts.hpp index f3908c6..3910daf 100644 --- a/src/cxxopts.hpp +++ b/src/cxxopts.hpp @@ -909,9 +909,13 @@ Options::help(const std::vector& groups) const std::string result = "Usage:\n " + m_program + " [OPTION...]" + m_help_string + "\n\n"; - for (const auto& g : groups) + for (std::size_t i = 0; i < groups.size(); ++i) { - result += help_one_group(g); + result += help_one_group(groups[i]); + if (i < groups.size() - 1) + { + result += "\n"; + } } return result; -- libgit2 0.21.4