From ccd0499c10b1ebf075bc251c4827ab79a6975165 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 23 Nov 2015 11:58:19 +0200 Subject: Change print_short_usage() to print_usage() --- cli/source.cxx | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'cli/source.cxx') diff --git a/cli/source.cxx b/cli/source.cxx index 0258c84..2113034 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -517,10 +517,7 @@ namespace virtual void traverse (type& c) { - const char* t ( - usage != ut_both - ? "" - : usage_ == ut_short ? "short_" : "long_"); + const char* t (usage != ut_both || usage_ == ut_short ? "" : "long_"); os << "// " << escape (c.name ()) << " base" << endl << "//" << endl @@ -751,7 +748,7 @@ namespace // If len is 0 then it means we have no options to print. // os << "void " << name << "::" << endl - << "print_" << (usage == ut_both ? "short_" : "") << "usage (" << + << "print_usage (" << options.ostream_type () << "&" << (len != 0 || b ? " os)" : ")") << "{"; @@ -1083,10 +1080,7 @@ namespace if (para_ == para_text) os << "os << ::std::endl;"; - const char* t ( - usage != ut_both - ? "" - : usage_ == ut_short ? "short_" : "long_"); + const char* t (usage != ut_both || usage_ == ut_short ? "" : "long_"); os << fq_name (c) << "::print_" << t << "usage (os);" << endl; @@ -1136,7 +1130,7 @@ generate_source (context& ctx) { os << "void" << endl - << n << (u == ut_both ? "short_" : "") << "usage (" << ost << "& os)" + << n << "usage (" << ost << "& os)" << "{" << "CLI_POTENTIALLY_UNUSED (os);" << endl; -- cgit v1.1