diff liboctave/array/idx-vector.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 938f01339043
children af41e41ad28e
line wrap: on
line diff
--- a/liboctave/array/idx-vector.cc	Wed Dec 04 18:56:47 2013 -0800
+++ b/liboctave/array/idx-vector.cc	Wed Dec 04 22:13:18 2013 -0800
@@ -595,7 +595,8 @@
 
       for (octave_idx_type i = 0; i < len; i++)
         {
-          octave_idx_type j = data[i], k = cnt[j]++;
+          octave_idx_type j = data[i];
+          octave_idx_type k = cnt[j]++;
           new_data[k] = j;
           idx_data[k] = i;
         }
@@ -836,7 +837,8 @@
           {
             // (i:k:end,:) reduces to a range if i <= k and k divides n.
             idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-            octave_idx_type s = r->get_start (), l = r->length (n);
+            octave_idx_type s = r->get_start ();
+            octave_idx_type l = r->length (n);
             octave_idx_type t = r->get_step ();
             if (l*t == n)
               {
@@ -860,7 +862,8 @@
             idx_range_rep * rj = dynamic_cast<idx_range_rep *> (j.rep);
             if (rj->get_step () == 1)
               {
-                octave_idx_type sj = rj->get_start (), lj = rj->length (nj);
+                octave_idx_type sj = rj->get_start ();
+                octave_idx_type lj = rj->length (nj);
                 *this = new idx_range_rep (sj * n, lj * n, 1, DIRECT);
                 reduced = true;
               }
@@ -873,7 +876,8 @@
             idx_scalar_rep * r = dynamic_cast<idx_scalar_rep *> (rep);
             idx_range_rep * rj = dynamic_cast<idx_range_rep *> (j.rep);
             octave_idx_type k = r->get_data ();
-            octave_idx_type sj = rj->get_start (), lj = rj->length (nj);
+            octave_idx_type sj = rj->get_start ();
+            octave_idx_type lj = rj->length (nj);
             octave_idx_type tj = rj->get_step ();
             *this = new idx_range_rep (n * sj + k, lj, n * tj, DIRECT);
             reduced = true;
@@ -885,10 +889,12 @@
             // (i:k:end,p:q) reduces to a range if i <= k and k divides n.
             // (ones (1, m), ones (1, n)) reduces to (ones (1, m*n))
             idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-            octave_idx_type s = r->get_start (), l = r->length (n);
+            octave_idx_type s = r->get_start ();
+            octave_idx_type l = r->length (n);
             octave_idx_type t = r->get_step ();
             idx_range_rep * rj = dynamic_cast<idx_range_rep *> (j.rep);
-            octave_idx_type sj = rj->get_start (), lj = rj->length (nj);
+            octave_idx_type sj = rj->get_start ();
+            octave_idx_type lj = rj->length (nj);
             octave_idx_type tj = rj->get_step ();
             if ((l*t == n && tj == 1) || (t == 0 && tj == 0))
               {
@@ -922,7 +928,8 @@
             // (i:d:j,k) reduces to a range.
             idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
             idx_scalar_rep * rj = dynamic_cast<idx_scalar_rep *> (j.rep);
-            octave_idx_type s = r->get_start (), l = r->length (nj);
+            octave_idx_type s = r->get_start ();
+            octave_idx_type l = r->length (nj);
             octave_idx_type t = r->get_step ();
             octave_idx_type k = rj->get_data ();
             *this = new idx_range_rep (n * k + s, l, t, DIRECT);
@@ -989,7 +996,8 @@
     case class_mask:
       {
         idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
-        octave_idx_type ext = r->extent (0), len = r->length (0);
+        octave_idx_type ext = r->extent (0);
+        octave_idx_type len = r->length (0);
         if (ext == len)
           {
             l = 0;
@@ -1062,7 +1070,8 @@
     case class_range:
       {
         idx_range_rep * r = dynamic_cast<idx_range_rep *> (rep);
-        octave_idx_type start = r->get_start (), step = r->get_step ();
+        octave_idx_type start = r->get_start ();
+        octave_idx_type step = r->get_step ();
         octave_idx_type i, j;
         if (step == 1)
           for (i = start, j = start + len; i < j; i++) *data++ = i;
@@ -1116,7 +1125,8 @@
   if (idx_class () == class_mask)
     {
       idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
-      octave_idx_type nz = r->length (0), ext = r->extent (0);
+      octave_idx_type nz = r->length (0);
+      octave_idx_type ext = r->extent (0);
       Array<bool> mask (dim_vector (n, 1));
       const bool *data = r->get_data ();
       bool *ndata = mask.fortran_vec ();
@@ -1207,7 +1217,8 @@
     {
       idx_mask_rep * r = dynamic_cast<idx_mask_rep *> (rep);
       const bool *data = r->get_data ();
-      octave_idx_type ext = r->extent (0), len = r->length (0);
+      octave_idx_type ext = r->extent (0);
+      octave_idx_type len = r->length (0);
       octave_idx_type *idata = new octave_idx_type [len];
 
       for (octave_idx_type i = 0, j = 0; i < ext; i++)