diff options
Diffstat (limited to 'cli')
-rw-r--r-- | cli/source.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cli/source.cxx b/cli/source.cxx index d49caf8..2b976d4 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -612,10 +612,6 @@ namespace { bool b (hb && !options.exclude_base ()); - os << "void " << name << "::" << endl - << "print_usage (::std::ostream&" << (ho || b ? " os" : "") << ")" - << "{"; - // Calculate option length. // size_t len (0); @@ -676,7 +672,7 @@ namespace } } - if (max != 0) + if (len != 0 && max != 0) { if (len > max) { @@ -690,6 +686,12 @@ namespace } } + // If len is 0 then it means we have no options to print. + // + os << "void " << name << "::" << endl + << "print_usage (::std::ostream&" << (len != 0 || b ? " os)" : ")") + << "{"; + // Call our bases. // if (b) |