Mercurial > octave
comparison libinterp/octave-value/ov-struct.cc @ 20218:b2100e1659ac
maint: Use cuddled parentheses when indexing dimension_vectors.
* libinterp/corefcn/besselj.cc, libinterp/corefcn/bsxfun.cc,
libinterp/corefcn/data.cc, libinterp/corefcn/dot.cc, libinterp/corefcn/fft.cc,
libinterp/corefcn/fft2.cc, libinterp/corefcn/tril.cc,
libinterp/corefcn/typecast.cc, libinterp/octave-value/ov-base-int.cc,
libinterp/octave-value/ov-base-mat.cc,
libinterp/octave-value/ov-base-sparse.cc,
libinterp/octave-value/ov-bool-mat.cc, libinterp/octave-value/ov-cell.cc,
libinterp/octave-value/ov-cx-mat.cc, libinterp/octave-value/ov-flt-cx-mat.cc,
libinterp/octave-value/ov-flt-re-mat.cc, libinterp/octave-value/ov-lazy-idx.cc,
libinterp/octave-value/ov-re-mat.cc, libinterp/octave-value/ov-str-mat.cc,
libinterp/octave-value/ov-struct.cc, liboctave/array/Array-util.cc,
liboctave/array/Array.cc, liboctave/array/CMatrix.cc,
liboctave/array/CNDArray.cc, liboctave/array/MArray.cc,
liboctave/array/Sparse.cc, liboctave/array/dMatrix.cc,
liboctave/array/dNDArray.cc, liboctave/array/fCMatrix.cc,
liboctave/array/fCNDArray.cc, liboctave/array/fMatrix.cc,
liboctave/array/fNDArray.cc, liboctave/operators/mx-inlines.cc:
maint: Use cuddled parentheses when indexing dimension_vectors.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 23 May 2015 21:46:44 -0700 |
parents | aa36fb998a4d |
children | a9574e3c6e9e |
comparison
equal
deleted
inserted
replaced
20217:b5d2f6954c48 | 20218:b2100e1659ac |
---|---|
733 } | 733 } |
734 | 734 |
735 static bool | 735 static bool |
736 scalar (const dim_vector& dims) | 736 scalar (const dim_vector& dims) |
737 { | 737 { |
738 return dims.length () == 2 && dims (0) == 1 && dims (1) == 1; | 738 return dims.length () == 2 && dims(0) == 1 && dims(1) == 1; |
739 } | 739 } |
740 | 740 |
741 | 741 |
742 bool | 742 bool |
743 octave_struct::save_ascii (std::ostream& os) | 743 octave_struct::save_ascii (std::ostream& os) |
749 const dim_vector dv = dims (); | 749 const dim_vector dv = dims (); |
750 | 750 |
751 os << "# ndims: " << dv.length () << "\n"; | 751 os << "# ndims: " << dv.length () << "\n"; |
752 | 752 |
753 for (int i = 0; i < dv.length (); i++) | 753 for (int i = 0; i < dv.length (); i++) |
754 os << " " << dv (i); | 754 os << " " << dv(i); |
755 os << "\n"; | 755 os << "\n"; |
756 | 756 |
757 os << "# length: " << nf << "\n"; | 757 os << "# length: " << nf << "\n"; |
758 | 758 |
759 // Iterating over the list of keys will preserve the order of the | 759 // Iterating over the list of keys will preserve the order of the |
1459 const dim_vector dv = dims (); | 1459 const dim_vector dv = dims (); |
1460 | 1460 |
1461 os << "# ndims: " << dv.length () << "\n"; | 1461 os << "# ndims: " << dv.length () << "\n"; |
1462 | 1462 |
1463 for (int i = 0; i < dv.length (); i++) | 1463 for (int i = 0; i < dv.length (); i++) |
1464 os << " " << dv (i); | 1464 os << " " << dv(i); |
1465 os << "\n"; | 1465 os << "\n"; |
1466 | 1466 |
1467 os << "# length: " << nf << "\n"; | 1467 os << "# length: " << nf << "\n"; |
1468 | 1468 |
1469 // Iterating over the list of keys will preserve the order of the | 1469 // Iterating over the list of keys will preserve the order of the |