diff libinterp/corefcn/__contourc__.cc @ 20802:8bb38ba1bad6

eliminate return statements after calls to print_usage * __contourc__.cc, __dispatch__.cc, __dsearchn__.cc, __ichol__.cc, __lin_interpn__.cc, __qp__.cc, balance.cc, betainc.cc, bsxfun.cc, colloc.cc, daspk.cc, dasrt.cc, dassl.cc, defaults.cc, det.cc, dlmread.cc, dot.cc, eig.cc, ellipj.cc, fft.cc, fft2.cc, fftn.cc, filter.cc, find.cc, gcd.cc, givens.cc, hex2num.cc, inv.cc, lookup.cc, lu.cc, max.cc, mgorth.cc, ordschur.cc, pinv.cc, profiler.cc, quad.cc, qz.cc, rcond.cc, schur.cc, str2double.cc: Eliminate return statements after calls to print_usage.
author John W. Eaton <jwe@octave.org>
date Fri, 04 Dec 2015 12:03:44 -0500
parents 8742e0b1cc49
children 1142cf6abc0d
line wrap: on
line diff
--- a/libinterp/corefcn/__contourc__.cc	Thu Dec 03 19:22:54 2015 -0500
+++ b/libinterp/corefcn/__contourc__.cc	Fri Dec 04 12:03:44 2015 -0500
@@ -44,6 +44,7 @@
 #include "error.h"
 #include "oct-obj.h"
 
+// FIXME: this looks like trouble...
 static Matrix this_contour;
 static Matrix contourc;
 static int elem;
@@ -303,28 +304,22 @@
 Undocumented internal function.\n\
 @end deftypefn")
 {
-  octave_value retval;
-
-  if (args.length () == 4)
-    {
-      RowVector X = args(0).row_vector_value ();
-      RowVector Y = args(1).row_vector_value ();
-      Matrix Z = args(2).matrix_value ();
-      RowVector L = args(3).row_vector_value ();
-
-      contourc.resize (2, 0);
-
-      for (int i = 0; i < L.numel (); i++)
-        cntr (X, Y, Z, L (i));
-
-      end_contour ();
-
-      retval = contourc;
-    }
-  else
+  if (args.length () != 4)
     print_usage ();
 
-  return retval;
+  RowVector X = args(0).row_vector_value ();
+  RowVector Y = args(1).row_vector_value ();
+  Matrix Z = args(2).matrix_value ();
+  RowVector L = args(3).row_vector_value ();
+
+  contourc.resize (2, 0);
+
+  for (int i = 0; i < L.numel (); i++)
+    cntr (X, Y, Z, L (i));
+
+  end_contour ();
+
+  return octave_value (contourc);
 }
 
 /*