Boost logo

Boost-Commit :

From: guillaume.melquiond_at_[hidden]
Date: 2008-08-05 06:20:50


Author: gmelquio
Date: 2008-08-05 06:20:49 EDT (Tue, 05 Aug 2008)
New Revision: 47987
URL: http://svn.boost.org/trac/boost/changeset/47987

Log:
Silent compilation warnings with GCC 4.3.
Text files modified:
   trunk/boost/numeric/interval/utility.hpp | 4 ++--
   trunk/libs/numeric/interval/examples/newton-raphson.cpp | 15 ++++++++++-----
   2 files changed, 12 insertions(+), 7 deletions(-)

Modified: trunk/boost/numeric/interval/utility.hpp
==============================================================================
--- trunk/boost/numeric/interval/utility.hpp (original)
+++ trunk/boost/numeric/interval/utility.hpp 2008-08-05 06:20:49 EDT (Tue, 05 Aug 2008)
@@ -144,8 +144,8 @@
              const interval<T, Policies2>& y)
 {
   if (interval_lib::detail::test_input(x, y)) return false;
- return x.lower() <= y.lower() && y.lower() <= x.upper() ||
- y.lower() <= x.lower() && x.lower() <= y.upper();
+ return (x.lower() <= y.lower() && y.lower() <= x.upper()) ||
+ (y.lower() <= x.lower() && x.lower() <= y.upper());
 }
 
 template<class T, class Policies> inline

Modified: trunk/libs/numeric/interval/examples/newton-raphson.cpp
==============================================================================
--- trunk/libs/numeric/interval/examples/newton-raphson.cpp (original)
+++ trunk/libs/numeric/interval/examples/newton-raphson.cpp 2008-08-05 06:20:49 EDT (Tue, 05 Aug 2008)
@@ -53,13 +53,15 @@
     if (overlap(x1, x)) x1 = intersect(x, x1);
     else if (x2_used) { x1 = x2; x2_used = false; }
     else continue;
- if (x2_used)
+ if (x2_used) {
       if (overlap(x2, x)) x2 = intersect(x, x2);
       else x2_used = false;
+ }
     if (x2_used && width(x2) > width(x1)) std::swap(x1, x2);
- if (!zero_in(f(x1)))
+ if (!zero_in(f(x1))) {
       if (x2_used) { x1 = x2; x2_used = false; }
       else continue;
+ }
     if (width(x1) < max_width) res.push_back(x1);
     else if (width(x1) > alpha * width(x)) {
       std::pair<I1, I1> p = bisect(x);
@@ -67,9 +69,10 @@
       x2 = p.second;
       x2_used = true;
     } else l.push_back(x1);
- if (x2_used && zero_in(f(x2)))
+ if (x2_used && zero_in(f(x2))) {
       if (width(x2) < max_width) res.push_back(x2);
       else l.push_back(x2);
+ }
   }
   return res;
 }
@@ -98,18 +101,20 @@
       x2 = intersect(x, xx - division_part2(vf, vd, x2_used));
     }
     if (width(x2) > width(x1)) std::swap(x1, x2);
- if (empty(x1) || !zero_in(f(x1)))
+ if (empty(x1) || !zero_in(f(x1))) {
       if (!empty(x2)) { x1 = x2; x2 = I2::empty(); }
       else continue;
+ }
     if (width(x1) < max_width) res.push_back(x1);
     else if (width(x1) > alpha * width(x)) {
       std::pair<I2, I2> p = bisect(x);
       if (zero_in(f(p.first))) l.push_back(p.first);
       x2 = p.second;
     } else l.push_back(x1);
- if (!empty(x2) && zero_in(f(x2)))
+ if (!empty(x2) && zero_in(f(x2))) {
       if (width(x2) < max_width) res.push_back(x2);
       else l.push_back(x2);
+ }
   }
   return res;
 }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk