summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-14 15:21:44 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-14 17:56:23 +0200
commit8afab33d161ddd39a3e6094b5daa08b156ef0421 (patch)
tree4e1331f9fc65513dd6502ebd221b35e9cb3d8e9d /tools
parent091742e86aeb5287f7236f666fee48946ab4c67b (diff)
just check if the fraction is < 0
Change-Id: I23f631898f29d8285d3da333686da8d3f28a00f8
Diffstat (limited to 'tools')
-rw-r--r--tools/source/generic/rational.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/source/generic/rational.cxx b/tools/source/generic/rational.cxx
index 30690bea2faa..fd1fbea35014 100644
--- a/tools/source/generic/rational.cxx
+++ b/tools/source/generic/rational.cxx
@@ -121,7 +121,7 @@ void rational_ReduceInaccurate(boost::rational<long>& rRational, unsigned nSigni
// Count with unsigned longs only
// http://www.boost.org/doc/libs/release/libs/rational/rational.html#Internal%20representation
- const bool bNeg = ( rRational.numerator() < 0 );
+ const bool bNeg = ( rRational < 0 );
unsigned long nMul = (unsigned long)( bNeg? -rRational.numerator(): rRational.numerator() );
unsigned long nDiv = (unsigned long)( rRational.denominator() );