diff liboctave/array/Array-util.cc @ 18084:8e056300994b

Follow coding convention of defining and initializing only 1 variable per line in liboctave. * liboctave/array/Array-b.cc, liboctave/array/Array-util.cc, liboctave/array/Array.cc, liboctave/array/CDiagMatrix.cc, liboctave/array/CMatrix.cc, liboctave/array/CSparse.cc, liboctave/array/MDiagArray2.cc, liboctave/array/MatrixType.cc, liboctave/array/PermMatrix.cc, liboctave/array/Sparse.cc, liboctave/array/Sparse.h, liboctave/array/boolSparse.cc, liboctave/array/dDiagMatrix.cc, liboctave/array/dMatrix.cc, liboctave/array/dSparse.cc, liboctave/array/dim-vector.cc, liboctave/array/fCDiagMatrix.cc, liboctave/array/fCMatrix.cc, liboctave/array/fDiagMatrix.cc, liboctave/array/fMatrix.cc, liboctave/array/idx-vector.cc, liboctave/array/idx-vector.h, liboctave/numeric/CmplxLU.cc, liboctave/numeric/CmplxQR.cc, liboctave/numeric/base-qr.cc, liboctave/numeric/bsxfun-defs.cc, liboctave/numeric/bsxfun.h, liboctave/numeric/dbleLU.cc, liboctave/numeric/dbleQR.cc, liboctave/numeric/fCmplxLU.cc, liboctave/numeric/fCmplxQR.cc, liboctave/numeric/floatLU.cc, liboctave/numeric/floatQR.cc, liboctave/numeric/lo-specfun.cc, liboctave/numeric/oct-convn.cc, liboctave/numeric/oct-norm.cc, liboctave/numeric/sparse-dmsolve.cc, liboctave/operators/mx-inlines.cc, liboctave/operators/mx-op-defs.h, liboctave/util/caseless-str.h, liboctave/util/kpse.cc, liboctave/util/lo-utils.cc, liboctave/util/oct-binmap.h, liboctave/util/oct-cmplx.h, liboctave/util/oct-inttypes.cc, liboctave/util/oct-inttypes.h, liboctave/util/oct-sort.cc: Follow coding convention of defining and initializing only 1 variable per line in liboctave.
author Rik <rik@octave.org>
date Wed, 04 Dec 2013 22:13:18 -0800
parents 49a5a4be04a1
children 4197fc428c7d
line wrap: on
line diff
--- a/liboctave/array/Array-util.cc	Wed Dec 04 18:56:47 2013 -0800
+++ b/liboctave/array/Array-util.cc	Wed Dec 04 22:13:18 2013 -0800
@@ -423,9 +423,11 @@
 dim_vector
 zero_dims_inquire (const Array<idx_vector>& ia, const dim_vector& rhdv)
 {
-  int ial = ia.length (), rhdvl = rhdv.length ();
+  int ial = ia.length ();
+  int rhdvl = rhdv.length ();
   dim_vector rdv = dim_vector::alloc (ial);
-  bool *scalar = new bool [ial], *colon = new bool [ial];
+  bool *scalar = new bool [ial];
+  bool *colon = new bool [ial];
   // Mark scalars and colons, count non-scalar indices.
   int nonsc = 0;
   bool all_colons = true;
@@ -479,7 +481,8 @@
 zero_dims_inquire (const idx_vector& i, const idx_vector& j,
                    const dim_vector& rhdv)
 {
-  bool icol = i.is_colon (), jcol = j.is_colon ();
+  bool icol = i.is_colon ();
+  bool jcol = j.is_colon ();
   dim_vector rdv;
   if (icol && jcol && rhdv.length () == 2)
     {
@@ -563,10 +566,12 @@
       else if (all_ranges && clen != 0)
         {
           // All ranges case - the result is a range.
-          octave_idx_type start = 0, step = 0;
+          octave_idx_type start = 0;
+          octave_idx_type step = 0;
           for (octave_idx_type i = len - 1; i >= 0; i--)
             {
-              octave_idx_type xstart = idxa(i)(0), xstep = idxa(i)(1) - xstart;
+              octave_idx_type xstart = idxa(i)(0);
+              octave_idx_type xstep = idxa(i)(1) - xstart;
               start = start * dvx(i) + xstart;
               step = step * dvx(i) + xstep;
             }
@@ -597,7 +602,8 @@
 Array<idx_vector>
 ind2sub (const dim_vector& dv, const idx_vector& idx)
 {
-  octave_idx_type len = idx.length (0), n = dv.length ();
+  octave_idx_type len = idx.length (0);
+  octave_idx_type n = dv.length ();
   Array<idx_vector> retval (dim_vector (n, 1));
   octave_idx_type numel = dv.numel ();