summaryrefslogtreecommitdiff
path: root/balance.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-20 23:49:18 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:38:29 -0400
commitc30f52090012f4632f4cfe6536abc4af7edfe363 (patch)
tree07388964ba67caba450283b28c7a9eff7e01a220 /balance.h
parentb84f676946941df6f7e8476d77d1db0cbe7736c5 (diff)
downloadfork-ledger-c30f52090012f4632f4cfe6536abc4af7edfe363.tar.gz
fork-ledger-c30f52090012f4632f4cfe6536abc4af7edfe363.tar.bz2
fork-ledger-c30f52090012f4632f4cfe6536abc4af7edfe363.zip
Decreased memory usage considerably
Diffstat (limited to 'balance.h')
-rw-r--r--balance.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/balance.h b/balance.h
index f3deea81..591aae25 100644
--- a/balance.h
+++ b/balance.h
@@ -24,23 +24,23 @@ class balance_t
// constructors
balance_t() {
- TRACE_CTOR("balance_t()");
+ TRACE_CTOR(balance_t, "");
}
balance_t(const balance_t& bal) {
- TRACE_CTOR("balance_t(copy)");
+ TRACE_CTOR(balance_t, "copy");
for (amounts_map::const_iterator i = bal.amounts.begin();
i != bal.amounts.end();
i++)
*this += (*i).second;
}
balance_t(const amount_t& amt) {
- TRACE_CTOR("balance_t(const amount_t&)");
+ TRACE_CTOR(balance_t, "const amount_t&");
if (! amt.realzero())
amounts.insert(amounts_pair(&amt.commodity(), amt));
}
template <typename T>
balance_t(T val) {
- TRACE_CTOR("balance_t(T)");
+ TRACE_CTOR(balance_t, "T");
amount_t amt(val);
if (! amt.realzero())
amounts.insert(amounts_pair(&amt.commodity(), amt));
@@ -502,30 +502,30 @@ class balance_pair_t
// constructors
balance_pair_t() : cost(NULL) {
- TRACE_CTOR("balance_pair_t()");
+ TRACE_CTOR(balance_pair_t, "");
}
balance_pair_t(const balance_pair_t& bal_pair)
: quantity(bal_pair.quantity), cost(NULL) {
- TRACE_CTOR("balance_pair_t(copy)");
+ TRACE_CTOR(balance_pair_t, "copy");
if (bal_pair.cost)
cost = new balance_t(*bal_pair.cost);
}
balance_pair_t(const balance_t& _quantity)
: quantity(_quantity), cost(NULL) {
- TRACE_CTOR("balance_pair_t(const balance_t&)");
+ TRACE_CTOR(balance_pair_t, "const balance_t&");
}
balance_pair_t(const amount_t& _quantity)
: quantity(_quantity), cost(NULL) {
- TRACE_CTOR("balance_pair_t(const amount_t&)");
+ TRACE_CTOR(balance_pair_t, "const amount_t&");
}
template <typename T>
balance_pair_t(T val) : quantity(val), cost(NULL) {
- TRACE_CTOR("balance_pair_t(T)");
+ TRACE_CTOR(balance_pair_t, "T");
}
// destructor
~balance_pair_t() {
- TRACE_DTOR("balance_pair_t");
+ TRACE_DTOR(balance_pair_t);
if (cost) delete cost;
}