summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-31 04:25:05 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-31 04:25:05 -0400
commite9ff5caa13e2d60681010dbedcf56459ee7521a4 (patch)
tree056a124c232daccb3dcc616a32fb3b2a9c217d86 /src/filters.cc
parentc96ab6cb0fb289cd50fb239ba44c01aba131fc18 (diff)
downloadledger-e9ff5caa13e2d60681010dbedcf56459ee7521a4.tar.gz
ledger-e9ff5caa13e2d60681010dbedcf56459ee7521a4.tar.bz2
ledger-e9ff5caa13e2d60681010dbedcf56459ee7521a4.zip
Rationals based math is now passing the unit tests.
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 47dec09b..4b8c7162 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -367,11 +367,7 @@ void changed_value_xacts::output_diff(const date_t& date)
value_t cur_bal;
last_xact->xdata().date = date;
-#ifdef INTEGER_MATH
- cur_bal = total_expr.calc(*last_xact).round();
-#else
- cur_bal = total_expr.calc(*last_xact);
-#endif
+ cur_bal = total_expr.calc(*last_xact).rounded();
if (value_t diff = cur_bal - last_balance) {
entry_temps.push_back(entry_t());
@@ -394,11 +390,7 @@ void changed_value_xacts::operator()(xact_t& xact)
item_handler<xact_t>::operator()(xact);
-#ifdef INTEGER_MATH
- last_balance = total_expr.calc(xact).round();
-#else
- last_balance = total_expr.calc(xact);
-#endif
+ last_balance = total_expr.calc(xact).rounded();
last_xact = &xact;
}