diff liboctave/idx-vector.cc @ 15018:3d8ace26c5b4

maint: Use Octave coding conventions for cuddled parentheses in liboctave/. * Array-util.cc, Array.cc, Array.h, CMatrix.cc, CNDArray.cc, CSparse.cc, CmplxQR.cc, CollocWt.cc, DASPK.cc, DASRT.cc, DASSL.cc, EIG.cc, LSODE.cc, MSparse.cc, MatrixType.cc, Sparse-op-defs.h, Sparse-perm-op-defs.h, Sparse.cc, Sparse.h, SparseCmplxCHOL.cc, SparseCmplxLU.cc, SparseCmplxQR.cc, SparseQR.cc, SparsedbleCHOL.cc, SparsedbleLU.cc, boolSparse.cc, cmd-hist.cc, dDiagMatrix.cc, dMatrix.cc, dNDArray.cc, dSparse.cc, data-conv.cc, dbleQR.cc, dbleSVD.cc, dim-vector.cc, eigs-base.cc, f2c-main.c, fCMatrix.cc, fCNDArray.cc, fCmplxQR.cc, fEIG.cc, fMatrix.cc, fNDArray.cc, floatQR.cc, floatSVD.cc, idx-vector.cc, kpse.cc, lo-specfun.cc, mx-inlines.cc, mx-op-defs.h, oct-alloc.cc, oct-binmap.h, oct-fftw.cc, oct-group.h, oct-inttypes.cc, oct-inttypes.h, oct-locbuf.cc, oct-md5.cc, oct-rand.cc, oct-sort.cc, oct-syscalls.cc, randgamma.c, randmtzig.c, randpoisson.c, sparse-base-chol.cc, sparse-base-lu.cc, sparse-dmsolve.cc, str-vec.cc, str-vec.h, tempnam.c, tempname.c: Use Octave coding conventions for cuddled parentheses in liboctave/.
author Rik <rik@octave.org>
date Thu, 26 Jul 2012 08:13:22 -0700
parents 72c96de7a403
children 560317fd5977
line wrap: on
line diff
--- a/liboctave/idx-vector.cc	Wed Jul 25 20:58:21 2012 -0700
+++ b/liboctave/idx-vector.cc	Thu Jul 26 08:13:22 2012 -0700
@@ -108,7 +108,7 @@
 idx_vector::idx_range_rep::idx_range_rep (octave_idx_type _start,
                                           octave_idx_type _limit,
                                           octave_idx_type _step)
-  : start(_start), len (_step ? std::max((_limit - _start) / _step, static_cast<octave_idx_type> (0)) : -1), step (_step)
+  : start(_start), len (_step ? std::max ((_limit - _start) / _step, static_cast<octave_idx_type> (0)) : -1), step (_step)
 {
   if (len < 0)
     {
@@ -385,7 +385,7 @@
 {
   if (len != 0)
     {
-      octave_idx_type *d = new octave_idx_type [1];
+      octave_idx_type *d = new octave_idx_type[1];
       d[0] = 0;
       data = d;
       ext = 1;
@@ -407,7 +407,7 @@
 
   if (len != 0)
     {
-      octave_idx_type *d = new octave_idx_type [len];
+      octave_idx_type *d = new octave_idx_type[len];
 
       octave_idx_type ntot = bnda.length ();
 
@@ -435,7 +435,7 @@
 
   if (len != 0)
     {
-      octave_idx_type *d = new octave_idx_type [len];
+      octave_idx_type *d = new octave_idx_type[len];
 
       octave_idx_type nnz = bnda.nnz ();
 
@@ -566,7 +566,7 @@
       for (octave_idx_type i = 0; i < len; i++)
         idx_data[i] = i;
 
-      octave_idx_type *new_data = new octave_idx_type [len];
+      octave_idx_type *new_data = new octave_idx_type[len];
       new_rep->data = new_data;
       std::copy (data, data + len, new_data);
 
@@ -585,7 +585,7 @@
       idx.clear (orig_dims);
       octave_idx_type *idx_data = idx.fortran_vec ();
 
-      octave_idx_type *new_data = new octave_idx_type [len];
+      octave_idx_type *new_data = new octave_idx_type[len];
       new_rep->data = new_data;
 
       for (octave_idx_type i = 0, k = 0; i < ext; i++)
@@ -654,7 +654,7 @@
 {
   if (len != 0)
     {
-      bool *d = new bool [1];
+      bool *d = new bool[1];
       d[0] = true;
       data = d;
       ext = 1;
@@ -1145,7 +1145,7 @@
 
   if (is_colon_equiv (n))
     retval = true;
-  else if (length (n) == n && extent(n) == n)
+  else if (length(n) == n && extent(n) == n)
     {
       OCTAVE_LOCAL_BUFFER_INIT (bool, left, n, true);
 
@@ -1190,7 +1190,7 @@
         const octave_idx_type *ri = r->get_data ();
         Array<octave_idx_type> idx (orig_dimensions ());
         for (octave_idx_type i = 0; i < n; i++)
-          idx.xelem(ri[i]) = i;
+          idx.xelem (ri[i]) = i;
         retval = new idx_vector_rep (idx, r->extent (0), DIRECT);
         break;
       }
@@ -1210,7 +1210,7 @@
       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 *idata = new octave_idx_type [len];
+      octave_idx_type *idata = new octave_idx_type[len];
 
       for (octave_idx_type i = 0, j = 0; i < ext; i++)
         if (data[i])
@@ -1330,7 +1330,7 @@
 
 /*
 
-%!error id=Octave:index-out-of-bounds 1(find([1,1] != 0))
-%!assert ((1:3)(find([1,0,1] != 0)), [1,3])
+%!error id=Octave:index-out-of-bounds 1(find ([1,1] != 0))
+%!assert ((1:3)(find ([1,0,1] != 0)), [1,3])
 
 */