summaryrefslogtreecommitdiff
path: root/src/cam/options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/options.cpp')
-rw-r--r--src/cam/options.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cam/options.cpp b/src/cam/options.cpp
index 721a808a..350c8084 100644
--- a/src/cam/options.cpp
+++ b/src/cam/options.cpp
@@ -902,8 +902,6 @@ OptionsParser::Options OptionsParser::parse(int argc, char **argv)
*/
void OptionsParser::usage()
{
- std::cerr << "Options:" << std::endl;
-
unsigned int indent = 0;
for (const Option &option : options_) {
@@ -923,7 +921,15 @@ void OptionsParser::usage()
indent = (indent + 7) / 8 * 8;
- for (const Option &option : options_) {
+ std::cerr << "Options:" << std::endl;
+
+ usageOptions(options_, indent);
+}
+
+void OptionsParser::usageOptions(const std::list<Option> &options,
+ unsigned int indent)
+{
+ for (const Option &option : options) {
std::string argument;
if (option.hasShortOption())
argument = std::string(" -")