From 6e584ca1765e1b48a05e72d48a55ca85a640f29e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 10 Feb 2012 20:10:45 -1000 Subject: Removed several unreached return statements --- src/precmd.cc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/precmd.cc b/src/precmd.cc index 8ca27fd8..663b638d 100644 --- a/src/precmd.cc +++ b/src/precmd.cc @@ -96,10 +96,8 @@ namespace { value_t parse_command(call_scope_t& args) { string arg = join_args(args); - if (arg.empty()) { + if (arg.empty()) throw std::logic_error(_("Usage: parse TEXT")); - return 1L; - } report_t& report(find_scope(args)); std::ostream& out(report.output_stream); @@ -145,10 +143,8 @@ value_t eval_command(call_scope_t& args) value_t format_command(call_scope_t& args) { string arg = join_args(args); - if (arg.empty()) { + if (arg.empty()) throw std::logic_error(_("Usage: format TEXT")); - return 1L; - } report_t& report(find_scope(args)); std::ostream& out(report.output_stream); @@ -174,10 +170,8 @@ value_t format_command(call_scope_t& args) value_t period_command(call_scope_t& args) { string arg = join_args(args); - if (arg.empty()) { + if (arg.empty()) throw std::logic_error(_("Usage: period TEXT")); - return 1L; - } report_t& report(find_scope(args)); std::ostream& out(report.output_stream); -- cgit v1.2.3