Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74150 - trunk/boost/geometry/util
From: barend.gehrels_at_[hidden]
Date: 2011-08-30 07:30:02


Author: barendgehrels
Date: 2011-08-30 07:30:01 EDT (Tue, 30 Aug 2011)
New Revision: 74150
URL: http://svn.boost.org/trac/boost/changeset/74150

Log:
Applied patch Mario Lang, using rational_cast instead
Text files modified:
   trunk/boost/geometry/util/rational.hpp | 8 ++------
   1 files changed, 2 insertions(+), 6 deletions(-)

Modified: trunk/boost/geometry/util/rational.hpp
==============================================================================
--- trunk/boost/geometry/util/rational.hpp (original)
+++ trunk/boost/geometry/util/rational.hpp 2011-08-30 07:30:01 EDT (Tue, 30 Aug 2011)
@@ -117,9 +117,7 @@
 {
     static inline int convert(rational<T> const& arg)
     {
- double v = arg.numerator();
- v /= arg.denominator();
- return int(v);
+ return int(rational_cast<double>(arg));
     }
 };
 
@@ -136,9 +134,7 @@
 {
     static inline double convert(rational<T> const& arg)
     {
- double v = arg.numerator();
- v /= arg.denominator();
- return v;
+ return rational_cast<double>(arg);
     }
 };
 


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