[PPL-devel] [GIT] ppl/ppl(master): Never leave operators at end of line.

Roberto Bagnara bagnara at cs.unipr.it
Mon Dec 21 18:29:44 CET 2009


Module: ppl/ppl
Branch: master
Commit: 1242e420c15da5fa9f671f4d93227ced7272f035
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=1242e420c15da5fa9f671f4d93227ced7272f035

Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date:   Mon Dec 21 18:28:30 2009 +0100

Never leave operators at end of line.

---

 src/BD_Shape.templates.hh        |    3 ++-
 src/Boundary.defs.hh             |    8 ++++----
 src/Circular_Interval.defs.hh    |   23 ++++++++++++-----------
 src/Interval.defs.hh             |    4 ++--
 src/Interval.inlines.hh          |    6 ++++--
 src/Octagonal_Shape.templates.hh |    4 ++--
 src/checked_float.inlines.hh     |    9 ++++++---
 src/globals.defs.hh              |    8 ++++----
 8 files changed, 36 insertions(+), 29 deletions(-)

diff --git a/src/BD_Shape.templates.hh b/src/BD_Shape.templates.hh
index 202135b..1368871 100644
--- a/src/BD_Shape.templates.hh
+++ b/src/BD_Shape.templates.hh
@@ -4461,7 +4461,8 @@ BD_Shape<T>
       bool is_right_coeff_one = (right_w_coeff == 1);
       bool is_right_coeff_minus_one = (right_w_coeff == -1);
       if (left_w_id == right_w_id) {
-        if ((is_left_coeff_one && is_right_coeff_one) ||
+        if ((is_left_coeff_one && is_right_coeff_one)
+            ||
             (is_left_coeff_minus_one && is_right_coeff_minus_one)) {
           // Here we have an identity or a constants-only constraint.
           return;
diff --git a/src/Boundary.defs.hh b/src/Boundary.defs.hh
index c4e25fc..ab7965a 100644
--- a/src/Boundary.defs.hh
+++ b/src/Boundary.defs.hh
@@ -316,8 +316,8 @@ is_boundary_infinity_closed(Boundary_Type type, const T& x, const Info& info) {
 template <typename Info>
 inline bool
 boundary_infinity_is_open(Boundary_Type type, const Info& info) {
-  return !Info::may_contain_infinity ||
-    info.get_boundary_property(type, OPEN);
+  return !Info::may_contain_infinity
+    || info.get_boundary_property(type, OPEN);
 }
 
 template <typename T, typename Info>
@@ -357,8 +357,8 @@ eq(Boundary_Type type1, const T1& x1, const Info1& info1,
     return is_minus_infinity(type2, x2, info2);
   else if (is_plus_infinity(type1, x1, info1))
     return is_plus_infinity(type2, x2, info2);
-  else if (is_minus_infinity(type2, x2, info2) ||
-	   is_plus_infinity(type2, x2, info2))
+  else if (is_minus_infinity(type2, x2, info2)
+           || is_plus_infinity(type2, x2, info2))
     return false;
   else
     return equal(x1, x2);
diff --git a/src/Circular_Interval.defs.hh b/src/Circular_Interval.defs.hh
index ecf451f..f363aaa 100644
--- a/src/Circular_Interval.defs.hh
+++ b/src/Circular_Interval.defs.hh
@@ -217,8 +217,8 @@ private:
   }
 public:
   bool OK() const {
-    return delta_ < delta_max() ||
-      (delta_ == delta_max() && start_ <= 1);
+    return delta_ < delta_max()
+      || (delta_ == delta_max() && start_ <= 1);
   }
   Circular_Interval() {
   }
@@ -609,8 +609,8 @@ public:
   I_Result add_assign(const Circular_Interval& x, const Circular_Interval& y) {
     if (x.maybe_check_empty() || y.maybe_check_empty())
       return assign(EMPTY);
-    if (x.is_universe() || y.is_universe() ||
-	add_saturates_unsigned(delta_, x.delta_, y.delta_, Policy::modulo))
+    if (x.is_universe() || y.is_universe()
+        || add_saturates_unsigned(delta_, x.delta_, y.delta_, Policy::modulo))
       return assign(UNIVERSE);
     add_wrap_unsigned(start_, x.start_, y.start_, Policy::modulo);
     return I_NOT_DEGENERATE | I_EXACT;
@@ -618,8 +618,8 @@ public:
   I_Result sub_assign(const Circular_Interval& x, const Circular_Interval& y) {
     if (x.maybe_check_empty() || y.maybe_check_empty())
       return assign(EMPTY);
-    if (x.is_universe() || y.is_universe() ||
-	add_saturates_unsigned(delta_, x.delta_, y.delta_, Policy::modulo))
+    if (x.is_universe() || y.is_universe()
+        || add_saturates_unsigned(delta_, x.delta_, y.delta_, Policy::modulo))
       return assign(UNIVERSE);
     sub_wrap_unsigned(start_, x.start_, y.end(), Policy::modulo);
     return I_NOT_DEGENERATE | I_EXACT;
@@ -629,11 +629,12 @@ public:
       return assign(EMPTY);
     I_Result r;
     delta_type d;
-    if (y.delta_ == 0 ?
-	mul_saturates_unsigned(d, y.start_, x.delta_, Policy::modulo) :
-	(add_saturates_unsigned(d, x.start_, x.delta_, Policy::modulo) ||
-	 mul_saturates_unsigned(d, d, y.delta_, Policy::modulo) ||
-	 add_mul_saturates_unsigned(d, y.start_, x.delta_, Policy::modulo))) {
+    if (y.delta_ == 0
+        ? mul_saturates_unsigned(d, y.start_, x.delta_, Policy::modulo)
+        : (add_saturates_unsigned(d, x.start_, x.delta_, Policy::modulo)
+           || mul_saturates_unsigned(d, d, y.delta_, Policy::modulo)
+           || add_mul_saturates_unsigned(d, y.start_, x.delta_,
+                                         Policy::modulo))) {
       assign(UNIVERSE);
       r = I_UNIVERSE;
     }
diff --git a/src/Interval.defs.hh b/src/Interval.defs.hh
index a40b971..1eba8ca 100644
--- a/src/Interval.defs.hh
+++ b/src/Interval.defs.hh
@@ -239,8 +239,8 @@ public:
   }
 
   bool check_empty(I_Result r) const {
-    return (r & I_ANY) == I_EMPTY ||
-      ((r & I_ANY) != I_NOT_EMPTY && is_empty());
+    return (r & I_ANY) == I_EMPTY
+      || ((r & I_ANY) != I_NOT_EMPTY && is_empty());
   }
 
   bool is_singleton() const {
diff --git a/src/Interval.inlines.hh b/src/Interval.inlines.hh
index 69ae867..94212b8 100644
--- a/src/Interval.inlines.hh
+++ b/src/Interval.inlines.hh
@@ -381,7 +381,8 @@ inline typename Enable_If<Is_Singleton<From>::value
 Interval<To_Boundary, To_Info>::difference_assign(const From& x) {
   PPL_ASSERT(f_OK(x));
   // FIXME: restrictions
-  if (lt(UPPER, upper(), info(), LOWER, f_lower(x), f_info(x)) ||
+  if (lt(UPPER, upper(), info(), LOWER, f_lower(x), f_info(x))
+      ||
       gt(LOWER, lower(), info(), UPPER, f_upper(x), f_info(x)))
     return combine(V_EQ, V_EQ);
   bool nl = ge(LOWER, lower(), info(), LOWER, f_lower(x), f_info(x));
@@ -416,7 +417,8 @@ Interval<To_Boundary, To_Info>::difference_assign(const From1& x,
   PPL_DIRTY_TEMP(To_Info, to_info);
   to_info.clear();
   // FIXME: restrictions
-  if (lt(UPPER, f_upper(x), f_info(x), LOWER, f_lower(y), f_info(y)) ||
+  if (lt(UPPER, f_upper(x), f_info(x), LOWER, f_lower(y), f_info(y))
+      ||
       gt(LOWER, f_lower(x), f_info(x), UPPER, f_upper(y), f_info(y)))
     return assign(x);
   bool nl = ge(LOWER, f_lower(x), f_info(x), LOWER, f_lower(y), f_info(y));
diff --git a/src/Octagonal_Shape.templates.hh b/src/Octagonal_Shape.templates.hh
index 19a0463..4838527 100644
--- a/src/Octagonal_Shape.templates.hh
+++ b/src/Octagonal_Shape.templates.hh
@@ -634,8 +634,8 @@ Octagonal_Shape<T>::refine_with_linear_form_inequality(
       bool is_right_coeff_one = (right_w_coeff == 1);
       bool is_right_coeff_minus_one = (right_w_coeff == -1);
       if (left_w_id == right_w_id) {
-        if ((is_left_coeff_one && is_right_coeff_one) ||
-            (is_left_coeff_minus_one && is_right_coeff_minus_one)) {
+        if ((is_left_coeff_one && is_right_coeff_one)
+            || (is_left_coeff_minus_one && is_right_coeff_minus_one)) {
           // Here we have an identity or a constants-only constraint.
           PPL_ASSERT(OK());
           return;
diff --git a/src/checked_float.inlines.hh b/src/checked_float.inlines.hh
index 3655786..e01ebed 100644
--- a/src/checked_float.inlines.hh
+++ b/src/checked_float.inlines.hh
@@ -495,7 +495,8 @@ template <typename To_Policy, typename From1_Policy, typename From2_Policy,
 inline Result
 mul_float(Type& to, const Type x, const Type y, Rounding_Dir dir) {
   if (To_Policy::check_inf_mul_zero
-      && ((x == 0 && is_inf_float<From2_Policy>(y)) ||
+      && ((x == 0 && is_inf_float<From2_Policy>(y))
+          ||
 	  (y == 0 && is_inf_float<From1_Policy>(x)))) {
     return assign_nan<To_Policy>(to, V_INF_MUL_ZERO);
   }
@@ -911,7 +912,8 @@ template <typename To_Policy, typename From1_Policy, typename From2_Policy,
 inline Result
 add_mul_float(Type& to, const Type x, const Type y, Rounding_Dir dir) {
   if (To_Policy::check_inf_mul_zero
-      && ((x == 0 && is_inf_float<From2_Policy>(y)) ||
+      && ((x == 0 && is_inf_float<From2_Policy>(y))
+          ||
 	  (y == 0 && is_inf_float<From1_Policy>(x)))) {
     return assign_nan<To_Policy>(to, V_INF_MUL_ZERO);
   }
@@ -943,7 +945,8 @@ template <typename To_Policy, typename From1_Policy, typename From2_Policy, type
 inline Result
 sub_mul_float(Type& to, const Type x, const Type y, Rounding_Dir dir) {
   if (To_Policy::check_inf_mul_zero
-      && ((x == 0 && is_inf_float<From2_Policy>(y)) ||
+      && ((x == 0 && is_inf_float<From2_Policy>(y))
+          ||
 	  (y == 0 && is_inf_float<From1_Policy>(x)))) {
     return assign_nan<To_Policy>(to, V_INF_MUL_ZERO);
   }
diff --git a/src/globals.defs.hh b/src/globals.defs.hh
index 65d3804..52a7edf 100644
--- a/src/globals.defs.hh
+++ b/src/globals.defs.hh
@@ -363,16 +363,16 @@ struct Constant_ : public TConstant<T, v> {
 template <typename T, long long v, bool prefer_signed>
 struct Constant_<T, v, prefer_signed,
 		 typename Enable_If<(Fit<typename C_Integer<T>::smaller_signed_type, v>::value
-				     && (prefer_signed ||
-					 !Fit<typename C_Integer<T>::smaller_unsigned_type, v>::value))>::type>
+				     && (prefer_signed
+                                         || !Fit<typename C_Integer<T>::smaller_unsigned_type, v>::value))>::type>
   : public Constant_<typename C_Integer<T>::smaller_signed_type, v, prefer_signed> {
 };
 
 template <typename T, long long v, bool prefer_signed>
 struct Constant_<T, v, prefer_signed,
 		 typename Enable_If<(Fit<typename C_Integer<T>::smaller_unsigned_type, v>::value
-				     && (!prefer_signed ||
-					 !Fit<typename C_Integer<T>::smaller_signed_type, v>::value))>::type>
+				     && (!prefer_signed
+                                         || !Fit<typename C_Integer<T>::smaller_signed_type, v>::value))>::type>
   : public Constant_<typename C_Integer<T>::smaller_unsigned_type, v, prefer_signed> {
 };
 




More information about the PPL-devel mailing list