diff liboctave/util/oct-inttypes.h @ 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 0cd39f7f2409
children 545a77c3206e
line wrap: on
line diff
--- a/liboctave/util/oct-inttypes.h	Wed Dec 04 18:56:47 2013 -0800
+++ b/liboctave/util/oct-inttypes.h	Wed Dec 04 22:13:18 2013 -0800
@@ -81,7 +81,8 @@
   class NM \
     { \
     public: \
-      static const bool ltval = (0 OP 1), gtval = (1 OP 0); \
+      static const bool ltval = (0 OP 1); \
+      static const bool gtval = (1 OP 0); \
       template <class T> \
       static bool op (T x, T y) { return x OP y; } \
     }
@@ -92,7 +93,8 @@
   class NM \
     { \
     public: \
-      static const bool ltval = value, gtval = value; \
+      static const bool ltval = value; \
+      static const bool gtval = value; \
       template <class T> \
       static bool op (T, T) { return value; } \
     }
@@ -268,7 +270,9 @@
     // An exhaustive test whether the max and/or min check can be omitted.
     static const bool t_is_signed = std::numeric_limits<T>::is_signed;
     static const bool s_is_signed = std::numeric_limits<S>::is_signed;
-    static const int t_size = sizeof (T), s_size = sizeof (S);
+    static const int t_size = sizeof (T);
+    static const int s_size = sizeof (S);
+
     static const bool omit_chk_min =
       (! s_is_signed || (t_is_signed && t_size >= s_size));
     static const bool omit_chk_max =
@@ -420,7 +424,8 @@
   {
     if (y != 0)
       {
-        T z = x / y, w = x % y;
+        T z = x / y;
+        T w = x % y;
         if (w >= y-w) z += 1;
         return z;
       }
@@ -610,7 +615,8 @@
     // compiler from interfering. Also, the signed operations on small types
     // actually return int.
     T u = static_cast<UT> (x) + static_cast<UT> (y);
-    T ux = u ^ x, uy = u ^ y;
+    T ux = u ^ x;
+    T uy = u ^ y;
     if ((ux & uy) < 0)
       {
         u = octave_int_base<T>::max_val () + __signbit (~u);
@@ -651,7 +657,8 @@
     // compiler from interfering. Also, the signed operations on small types
     // actually return int.
     T u = static_cast<UT> (x) - static_cast<UT> (y);
-    T ux = u ^ x, uy = u ^ ~y;
+    T ux = u ^ x;
+    T uy = u ^ ~y;
     if ((ux & uy) < 0)
       {
         u = octave_int_base<T>::max_val () + __signbit (~u);
@@ -1237,7 +1244,8 @@
 octave_int<T>
 xmax (const octave_int<T>& x, const octave_int<T>& y)
 {
-  const T xv = x.value (), yv = y.value ();
+  const T xv = x.value ();
+  const T yv = y.value ();
   return octave_int<T> (xv >= yv ? xv : yv);
 }
 
@@ -1245,7 +1253,8 @@
 octave_int<T>
 xmin (const octave_int<T>& x, const octave_int<T>& y)
 {
-  const T xv = x.value (), yv = y.value ();
+  const T xv = x.value ();
+  const T yv = y.value ();
   return octave_int<T> (xv <= yv ? xv : yv);
 }