diff libinterp/corefcn/betainc.cc @ 20918:6f0bd96f93c0

maint: Use new C++ archetype in more files. Place input validation first in files. Move declaration of retval down in function to be closer to point of usage. Eliminate else clause after if () error. Use "return ovl()" where it makes sense. * __dispatch__.cc, __dsearchn__.cc, __ichol__.cc, __lin_interpn__.cc, balance.cc, betainc.cc, bitfcns.cc, bsxfun.cc, cellfun.cc, colloc.cc, conv2.cc, daspk.cc, dasrt.cc, dassl.cc, data.cc, debug.cc, dirfns.cc, dlmread.cc, dot.cc, eig.cc, error.cc, fft.cc, fft2.cc, fftn.cc, file-io.cc, ov-type-conv.h: Use new C++ archetype in more files.
author Rik <rik@octave.org>
date Wed, 16 Dec 2015 15:00:31 -0800
parents 1142cf6abc0d
children 48b2ad5ee801
line wrap: on
line diff
--- a/libinterp/corefcn/betainc.cc	Wed Dec 16 17:09:44 2015 -0500
+++ b/libinterp/corefcn/betainc.cc	Wed Dec 16 15:00:31 2015 -0800
@@ -65,11 +65,11 @@
 @seealso{betaincinv, beta, betaln}\n\
 @end deftypefn")
 {
-  octave_value retval;
-
   if (args.length () != 3)
     print_usage ();
 
+  octave_value retval;
+
   octave_value x_arg = args(0);
   octave_value a_arg = args(1);
   octave_value b_arg = args(2);
@@ -298,11 +298,11 @@
 @seealso{betainc, beta, betaln}\n\
 @end deftypefn")
 {
-  octave_value retval;
-
   if (args.length () != 3)
     print_usage ();
 
+  octave_value retval;
+
   octave_value x_arg = args(0);
   octave_value a_arg = args(1);
   octave_value b_arg = args(2);
@@ -396,7 +396,6 @@
       retval = Array<float> (retval.array_value ());
     }
 
-
   return retval;
 }