Mercurial > octave
diff libinterp/corefcn/tril.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 | d9ca869ca124 |
children | 1142cf6abc0d |
line wrap: on
line diff
--- a/libinterp/corefcn/tril.cc Tue Dec 08 17:41:32 2015 -0800 +++ b/libinterp/corefcn/tril.cc Wed Dec 09 14:00:43 2015 -0500 @@ -131,10 +131,7 @@ do_tril (const Sparse<T>& a, octave_idx_type k, bool pack) { if (pack) // FIXME - { - error ("tril: \"pack\" not implemented for sparse matrices"); - return Sparse<T> (); - } + error ("tril: \"pack\" not implemented for sparse matrices"); Sparse<T> m = a; octave_idx_type nc = m.cols (); @@ -145,6 +142,7 @@ m.data(i) = 0.; m.maybe_compress (true); + return m; } @@ -153,10 +151,7 @@ do_triu (const Sparse<T>& a, octave_idx_type k, bool pack) { if (pack) // FIXME - { - error ("triu: \"pack\" not implemented for sparse matrices"); - return Sparse<T> (); - } + error ("triu: \"pack\" not implemented for sparse matrices"); Sparse<T> m = a; octave_idx_type nc = m.cols (); @@ -267,11 +262,8 @@ // but will also work on arbitrary user types if (pack) // FIXME - { - error ("%s: \"pack\" not implemented for class %s", - name.c_str (), arg.class_name ().c_str ()); - return octave_value (); - } + error ("%s: \"pack\" not implemented for class %s", + name.c_str (), arg.class_name ().c_str ()); octave_value tmp = arg; if (arg.numel () == 0)