comparison libinterp/corefcn/oct-stream.cc @ 20267:a9574e3c6e9e

Deprecate Array::length() and Sparse::length() in favour of ::numel(). * liboctave/array/Array.h (Array::length): deprecate for ::numel. * liboctave/array/Sparse.h (Sparse::length): deprecate for ::numel. * libgui/graphics/QtHandlesUtils.cc, libgui/src/octave-qt-link.cc, libinterp/corefcn/Cell.cc, libinterp/corefcn/__contourc__.cc, libinterp/corefcn/__pchip_deriv__.cc, libinterp/corefcn/__qp__.cc, libinterp/corefcn/cellfun.cc, libinterp/corefcn/daspk.cc, libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc, libinterp/corefcn/data.cc, libinterp/corefcn/filter.cc, libinterp/corefcn/find.cc, libinterp/corefcn/gl-render.cc, libinterp/corefcn/gl-render.h, libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h, libinterp/corefcn/help.cc, libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc, libinterp/corefcn/load-path.cc, libinterp/corefcn/load-save.cc, libinterp/corefcn/ls-oct-ascii.h, libinterp/corefcn/lsode.cc, libinterp/corefcn/matrix_type.cc, libinterp/corefcn/oct-hist.cc, libinterp/corefcn/oct-map.cc, libinterp/corefcn/oct-map.h, libinterp/corefcn/oct-obj.h, libinterp/corefcn/oct-stream.cc, libinterp/corefcn/oct-stream.h, libinterp/corefcn/pr-output.cc, libinterp/corefcn/quadcc.cc, libinterp/corefcn/rand.cc, libinterp/corefcn/regexp.cc, libinterp/corefcn/strfns.cc, libinterp/corefcn/sub2ind.cc, libinterp/corefcn/symtab.h, libinterp/corefcn/syscalls.cc, libinterp/corefcn/tsearch.cc, libinterp/corefcn/urlwrite.cc, libinterp/corefcn/utils.cc, libinterp/corefcn/variables.cc, libinterp/corefcn/xdiv.cc, libinterp/corefcn/xpow.cc, libinterp/dldfcn/__glpk__.cc, libinterp/dldfcn/__init_fltk__.cc, libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/audiodevinfo.cc, libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/colamd.cc, libinterp/octave-value/ov-cell.cc, libinterp/octave-value/ov-class.cc, libinterp/octave-value/ov-class.h, libinterp/octave-value/ov-fcn-inline.cc, libinterp/octave-value/ov-java.cc, libinterp/octave-value/ov-perm.cc, libinterp/octave-value/ov-struct.cc, libinterp/octave-value/ov-typeinfo.cc, libinterp/octave-value/ov.cc, libinterp/operators/op-int.h, libinterp/parse-tree/pt-pr-code.cc, liboctave/array/Array-util.cc, liboctave/array/Array.cc, liboctave/array/CColVector.cc, liboctave/array/CDiagMatrix.cc, liboctave/array/CMatrix.cc, liboctave/array/CRowVector.cc, liboctave/array/DiagArray2.cc, liboctave/array/DiagArray2.h, liboctave/array/MArray.cc, liboctave/array/PermMatrix.cc, liboctave/array/PermMatrix.h, liboctave/array/Sparse.cc, liboctave/array/boolMatrix.cc, liboctave/array/chMatrix.cc, liboctave/array/chNDArray.cc, liboctave/array/dColVector.cc, liboctave/array/dDiagMatrix.cc, liboctave/array/dMatrix.cc, liboctave/array/dRowVector.cc, liboctave/array/fCColVector.cc, liboctave/array/fCDiagMatrix.cc, liboctave/array/fCMatrix.cc, liboctave/array/fCRowVector.cc, liboctave/array/fColVector.cc, liboctave/array/fDiagMatrix.cc, liboctave/array/fMatrix.cc, liboctave/array/fRowVector.cc, liboctave/array/idx-vector.cc, liboctave/array/intNDArray.cc, liboctave/numeric/CmplxCHOL.cc, liboctave/numeric/CmplxLU.cc, liboctave/numeric/CmplxQR.cc, liboctave/numeric/DASPK.cc, liboctave/numeric/DASRT.cc, liboctave/numeric/DASSL.cc, liboctave/numeric/LSODE.cc, liboctave/numeric/ODES.cc, liboctave/numeric/ODES.h, liboctave/numeric/base-dae.h, liboctave/numeric/base-lu.cc, liboctave/numeric/dbleCHOL.cc, liboctave/numeric/dbleLU.cc, liboctave/numeric/dbleQR.cc, liboctave/numeric/eigs-base.cc, liboctave/numeric/fCmplxCHOL.cc, liboctave/numeric/fCmplxLU.cc, liboctave/numeric/fCmplxQR.cc, liboctave/numeric/floatCHOL.cc, liboctave/numeric/floatLU.cc, liboctave/numeric/floatQR.cc, liboctave/numeric/lo-specfun.cc, liboctave/numeric/oct-rand.cc, liboctave/numeric/oct-spparms.cc, liboctave/numeric/sparse-base-chol.cc, liboctave/operators/mx-inlines.cc, liboctave/system/file-ops.cc, liboctave/util/glob-match.h, liboctave/util/kpse.cc, liboctave/util/lo-regexp.cc, liboctave/util/oct-glob.cc, liboctave/util/pathsearch.cc, liboctave/util/str-vec.cc, liboctave/util/str-vec.h, liboctave/util/url-transfer.cc: replace all usage of Array::length() and Sparse::length() with ::numel().
author Carnë Draug <carandraug@octave.org>
date Sat, 30 May 2015 03:14:07 +0100
parents e914b5399c67
children 0d94ec291ee6
comparison
equal deleted inserted replaced
20266:83792dd9bcc1 20267:a9574e3c6e9e
121 one_elt_size_spec = false; 121 one_elt_size_spec = false;
122 122
123 double dnr = -1.0; 123 double dnr = -1.0;
124 double dnc = -1.0; 124 double dnc = -1.0;
125 125
126 octave_idx_type sz_len = size.length (); 126 octave_idx_type sz_len = size.numel ();
127 127
128 if (sz_len == 1) 128 if (sz_len == 1)
129 { 129 {
130 one_elt_size_spec = true; 130 one_elt_size_spec = true;
131 131
233 delete buf; 233 delete buf;
234 } 234 }
235 235
236 scanf_format_list::~scanf_format_list (void) 236 scanf_format_list::~scanf_format_list (void)
237 { 237 {
238 octave_idx_type n = list.length (); 238 octave_idx_type n = list.numel ();
239 239
240 for (octave_idx_type i = 0; i < n; i++) 240 for (octave_idx_type i = 0; i < n; i++)
241 { 241 {
242 scanf_format_elt *elt = list(i); 242 scanf_format_elt *elt = list(i);
243 delete elt; 243 delete elt;
257 { 257 {
258 scanf_format_elt *elt 258 scanf_format_elt *elt
259 = new scanf_format_elt (text.c_str (), width, discard, type, 259 = new scanf_format_elt (text.c_str (), width, discard, type,
260 modifier, char_class); 260 modifier, char_class);
261 261
262 if (num_elts == list.length ()) 262 if (num_elts == list.numel ())
263 list.resize (dim_vector (2 * num_elts, 1)); 263 list.resize (dim_vector (2 * num_elts, 1));
264 264
265 list(num_elts++) = elt; 265 list(num_elts++) = elt;
266 } 266 }
267 267
487 } 487 }
488 488
489 void 489 void
490 scanf_format_list::printme (void) const 490 scanf_format_list::printme (void) const
491 { 491 {
492 octave_idx_type n = list.length (); 492 octave_idx_type n = list.numel ();
493 493
494 for (octave_idx_type i = 0; i < n; i++) 494 for (octave_idx_type i = 0; i < n; i++)
495 { 495 {
496 scanf_format_elt *elt = list(i); 496 scanf_format_elt *elt = list(i);
497 497
515 } 515 }
516 516
517 bool 517 bool
518 scanf_format_list::all_character_conversions (void) 518 scanf_format_list::all_character_conversions (void)
519 { 519 {
520 octave_idx_type n = list.length (); 520 octave_idx_type n = list.numel ();
521 521
522 if (n > 0) 522 if (n > 0)
523 { 523 {
524 for (octave_idx_type i = 0; i < n; i++) 524 for (octave_idx_type i = 0; i < n; i++)
525 { 525 {
545 } 545 }
546 546
547 bool 547 bool
548 scanf_format_list::all_numeric_conversions (void) 548 scanf_format_list::all_numeric_conversions (void)
549 { 549 {
550 octave_idx_type n = list.length (); 550 octave_idx_type n = list.numel ();
551 551
552 if (n > 0) 552 if (n > 0)
553 { 553 {
554 for (octave_idx_type i = 0; i < n; i++) 554 for (octave_idx_type i = 0; i < n; i++)
555 { 555 {
662 } 662 }
663 } 663 }
664 664
665 printf_format_list::~printf_format_list (void) 665 printf_format_list::~printf_format_list (void)
666 { 666 {
667 octave_idx_type n = list.length (); 667 octave_idx_type n = list.numel ();
668 668
669 for (octave_idx_type i = 0; i < n; i++) 669 for (octave_idx_type i = 0; i < n; i++)
670 { 670 {
671 printf_format_elt *elt = list(i); 671 printf_format_elt *elt = list(i);
672 delete elt; 672 delete elt;
686 { 686 {
687 printf_format_elt *elt 687 printf_format_elt *elt
688 = new printf_format_elt (text.c_str (), args, fw, prec, flags, 688 = new printf_format_elt (text.c_str (), args, fw, prec, flags,
689 type, modifier); 689 type, modifier);
690 690
691 if (num_elts == list.length ()) 691 if (num_elts == list.numel ())
692 list.resize (dim_vector (2 * num_elts, 1)); 692 list.resize (dim_vector (2 * num_elts, 1));
693 693
694 list(num_elts++) = elt; 694 list(num_elts++) = elt;
695 } 695 }
696 696
869 } 869 }
870 870
871 void 871 void
872 printf_format_list::printme (void) const 872 printf_format_list::printme (void) const
873 { 873 {
874 int n = list.length (); 874 int n = list.numel ();
875 875
876 for (int i = 0; i < n; i++) 876 for (int i = 0; i < n; i++)
877 { 877 {
878 printf_format_elt *elt = list(i); 878 printf_format_elt *elt = list(i);
879 879