summaryrefslogtreecommitdiff
path: root/balance.h
diff options
context:
space:
mode:
Diffstat (limited to 'balance.h')
-rw-r--r--balance.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/balance.h b/balance.h
index 28423a64..bcfb91a6 100644
--- a/balance.h
+++ b/balance.h
@@ -114,11 +114,13 @@ public:
if (! amt.is_realzero())
amounts.insert(amounts_map::value_type(&amt.commodity(), amt));
}
+#ifdef HAVE_GDTOA
balance_t(const double val) {
TRACE_CTOR(balance_t, "const double");
amounts.insert
(amounts_map::value_type(amount_t::current_pool->null_commodity, val));
}
+#endif
balance_t(const unsigned long val) {
TRACE_CTOR(balance_t, "const unsigned long");
amounts.insert
@@ -233,9 +235,11 @@ public:
virtual balance_t& operator*=(const amount_t& amt);
+#ifdef HAVE_GDTOA
balance_t& operator*=(const double val) {
return *this *= amount_t(val);
}
+#endif
balance_t& operator*=(const unsigned long val) {
return *this *= amount_t(val);
}
@@ -245,9 +249,11 @@ public:
virtual balance_t& operator/=(const amount_t& amt);
+#ifdef HAVE_GDTOA
balance_t& operator/=(const double val) {
return *this /= amount_t(val);
}
+#endif
balance_t& operator/=(const unsigned long val) {
return *this /= amount_t(val);
}