summaryrefslogtreecommitdiff
path: root/src/balance.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-30 19:30:16 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-30 19:30:16 -0400
commite0dd2cd0a44ddbfabadb30da4569e10fd36960a9 (patch)
tree74e691cce67fbc1e975c918d2acb34733b1fd857 /src/balance.h
parent6213dc5af8b365cde2495fddaa465b0427779d00 (diff)
downloadfork-ledger-e0dd2cd0a44ddbfabadb30da4569e10fd36960a9.tar.gz
fork-ledger-e0dd2cd0a44ddbfabadb30da4569e10fd36960a9.tar.bz2
fork-ledger-e0dd2cd0a44ddbfabadb30da4569e10fd36960a9.zip
Changed to using rational numbers instead of integer approximations.
As a result, dependency on the gdtoa was dropped, and dependency on mpfr was added.
Diffstat (limited to 'src/balance.h')
-rw-r--r--src/balance.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/balance.h b/src/balance.h
index 8f565e78..eec86576 100644
--- a/src/balance.h
+++ b/src/balance.h
@@ -311,6 +311,8 @@ public:
return temp;
}
+#ifdef INTEGER_MATH
+
balance_t round() const {
balance_t temp;
foreach (const amounts_map::value_type& pair, amounts)
@@ -335,6 +337,8 @@ public:
return *this;
}
+#endif // INTEGER_MATH
+
balance_t unround() const {
balance_t temp;
foreach (const amounts_map::value_type& pair, amounts)