# HG changeset patch # User Rik # Date 1602866896 25200 # Node ID ef2b0a00daef648a929ca97ac5fffb14f1334a66 # Parent 6e460773bdda65c82861926348d319d51c463864 maint: Don't declare nargin in C++ files if it is used only once. * __betainc__.cc, __expint__.cc, __gammainc__.cc, dirfns.cc, strfns.cc: Don't declare nargin in C++ files if it is used only once. diff -r 6e460773bdda -r ef2b0a00daef libinterp/corefcn/__betainc__.cc --- a/libinterp/corefcn/__betainc__.cc Fri Oct 16 09:27:56 2020 -0700 +++ b/libinterp/corefcn/__betainc__.cc Fri Oct 16 09:48:16 2020 -0700 @@ -37,9 +37,7 @@ Continued fraction for incomplete beta function. @end deftypefn */) { - int nargin = args.length (); - - if (nargin != 3) + if (args.length () != 3) print_usage (); bool is_single = (args(0).is_single_type () || args(1).is_single_type () diff -r 6e460773bdda -r ef2b0a00daef libinterp/corefcn/__expint__.cc --- a/libinterp/corefcn/__expint__.cc Fri Oct 16 09:27:56 2020 -0700 +++ b/libinterp/corefcn/__expint__.cc Fri Oct 16 09:48:16 2020 -0700 @@ -37,9 +37,7 @@ Continued fraction expansion for the exponential integral. @end deftypefn */) { - int nargin = args.length (); - - if (nargin != 1) + if (args.length () != 1) print_usage (); octave_value_list retval; diff -r 6e460773bdda -r ef2b0a00daef libinterp/corefcn/__gammainc__.cc --- a/libinterp/corefcn/__gammainc__.cc Fri Oct 16 09:27:56 2020 -0700 +++ b/libinterp/corefcn/__gammainc__.cc Fri Oct 16 09:48:16 2020 -0700 @@ -36,9 +36,7 @@ Continued fraction for incomplete gamma function. @end deftypefn */) { - int nargin = args.length (); - - if (nargin != 2) + if (args.length () != 2) print_usage (); bool is_single = args(0).is_single_type () || args(1).is_single_type (); diff -r 6e460773bdda -r ef2b0a00daef libinterp/corefcn/dirfns.cc --- a/libinterp/corefcn/dirfns.cc Fri Oct 16 09:27:56 2020 -0700 +++ b/libinterp/corefcn/dirfns.cc Fri Oct 16 09:48:16 2020 -0700 @@ -701,9 +701,7 @@ @seealso{filesep} @end deftypefn */) { - int nargin = args.length (); - - if (nargin > 0) + if (args.length () > 0) print_usage (); return ovl (octave::directory_path::path_sep_str ()); diff -r 6e460773bdda -r ef2b0a00daef libinterp/corefcn/strfns.cc --- a/libinterp/corefcn/strfns.cc Fri Oct 16 09:27:56 2020 -0700 +++ b/libinterp/corefcn/strfns.cc Fri Oct 16 09:48:16 2020 -0700 @@ -881,9 +881,7 @@ @seealso{native2unicode, __unicode2native__} @end deftypefn */) { - int nargin = args.length (); - - if (nargin != 2) + if (args.length () != 2) print_usage (); if (args(0).is_string ()) @@ -934,9 +932,7 @@ @seealso{unicode2native, __native2unicode__} @end deftypefn */) { - int nargin = args.length (); - - if (nargin != 2) + if (args.length () != 2) print_usage (); std::string tmp = args(1).string_value (); @@ -1001,9 +997,7 @@ @end deftypefn */) { - int nargin = args.length (); - - if (nargin != 1) + if (args.length () != 1) print_usage (); charNDArray str = args(0).xchar_array_value ("STR must be a string");