Mercurial > hg > octave-nkf
diff src/data.cc @ 10002:e93c9bfff8b8
allow size_equal with 0 arguments
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Sat, 19 Dec 2009 21:10:46 +0100 |
parents | b5aa5d9ee6b9 |
children | 184060864627 |
line wrap: on
line diff
--- a/src/data.cc +++ b/src/data.cc @@ -2545,7 +2545,7 @@ @deftypefn {Built-in Function} {} size_equal (@var{a}, @var{b}, @dots{})\n\ Return true if the dimensions of all arguments agree.\n\ Trailing singleton dimensions are ignored.\n\ -Called with a single argument, size_equal returns true.\n\ +Called with a single or no argument, size_equal returns true.\n\ @seealso{size, numel}\n\ @end deftypefn") { @@ -2553,10 +2553,10 @@ int nargin = args.length (); + retval = true; + if (nargin >= 1) { - retval = true; - dim_vector a_dims = args(0).dims (); for (int i = 1; i < nargin; ++i) @@ -2570,8 +2570,6 @@ } } } - else - print_usage (); return retval; }