[PPL-devel] [GIT] ppl/ppl(master): Added missing parentheses.

Patricia Hill p.m.hill at leeds.ac.uk
Wed Mar 21 18:00:46 CET 2012


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

Author: Patricia Hill <p.m.hill at leeds.ac.uk>
Date:   Wed Mar 21 16:59:21 2012 +0000

Added missing parentheses.
Detected by eclair service exprprns.

---

 src/OR_Matrix.inlines.hh   |    2 +-
 src/checked_int.inlines.hh |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/OR_Matrix.inlines.hh b/src/OR_Matrix.inlines.hh
index 28b2620..91917e8 100644
--- a/src/OR_Matrix.inlines.hh
+++ b/src/OR_Matrix.inlines.hh
@@ -245,7 +245,7 @@ inline typename OR_Matrix<T>::template any_row_iterator<U>&
 OR_Matrix<T>::any_row_iterator<U>::operator+=(const difference_type m) {
   difference_type e_dt = static_cast<difference_type>(e);
   difference_type i_dt = static_cast<difference_type>(i);
-  difference_type increment = m + ((m * m) / 2) + (m * e_dt);
+  difference_type increment = (m + ((m * m) / 2)) + (m * e_dt);
   if (e_dt % 2 == 0 && m % 2 != 0)
     ++increment;
   e_dt += m;
diff --git a/src/checked_int.inlines.hh b/src/checked_int.inlines.hh
index 0a8175b..9e6a34d 100644
--- a/src/checked_int.inlines.hh
+++ b/src/checked_int.inlines.hh
@@ -1392,7 +1392,7 @@ smod_2exp_unsigned_int(Type& to, const Type x, unsigned int exp,
     to = x;
   else {
     Type v = (exp == sizeof_to_bits(sizeof(Type)) ? x : (x & ((Type(1) << exp) - 1)));
-    if (v >= Type(1) << (exp - 1))
+    if (v >= (Type(1) << (exp - 1)))
       return set_neg_overflow_int<To_Policy>(to, dir);
     else
       to = v;




More information about the PPL-devel mailing list