Mercurial > octave
diff libinterp/corefcn/dlmread.cc @ 20831:35241c4b696c
eliminate return statements after calls to error
* Cell.cc, __ichol__.cc, __lin_interpn__.cc, __pchip_deriv__.cc,
besselj.cc, cellfun.cc, colloc.cc, debug.cc, dlmread.cc,
dynamic-ld.cc, filter.cc, find.cc, gl2ps-renderer.cc, load-path.cc,
load-save.cc, ls-mat4.cc, ls-mat5.cc, ls-oct-text.cc, luinc.cc,
max.cc, nproc.cc, oct-hist.cc, oct-map.cc, oct-obj.cc, oct-stream.cc,
ordschur.cc, pinv.cc, pr-output.cc, profiler.cc, psi.cc, quadcc.cc,
qz.cc, rand.cc, strfind.cc, strfns.cc, sysdep.cc, toplev.cc, tril.cc,
typecast.cc, urlwrite.cc, utils.cc, variables.cc: Eliminate return
statements after calls to error.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 09 Dec 2015 14:00:43 -0500 |
parents | 8bb38ba1bad6 |
children | 1142cf6abc0d |
line wrap: on
line diff
--- a/libinterp/corefcn/dlmread.cc Tue Dec 08 17:41:32 2015 -0800 +++ b/libinterp/corefcn/dlmread.cc Wed Dec 09 14:00:43 2015 -0500 @@ -218,12 +218,9 @@ input_file.open (tname.c_str (), std::ios::in); if (! input_file) - { - error ("dlmread: unable to open file '%s'", fname.c_str ()); - return retval; - } - else - input = &input_file; + error ("dlmread: unable to open file '%s'", fname.c_str ()); + + input = &input_file; } else if (args(0).is_scalar_type ()) { @@ -232,16 +229,10 @@ input = is.input_stream (); if (! input) - { - error ("dlmread: stream FILE not open for input"); - return retval; - } + error ("dlmread: stream FILE not open for input"); } else - { - error ("dlmread: FILE argument must be a string or file id"); - return retval; - } + error ("dlmread: FILE argument must be a string or file id"); // Set default separator. std::string sep;