summaryrefslogtreecommitdiff
path: root/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-08-22 18:34:18 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-08-22 18:34:18 -0400
commit6365b8b7a807351209330ba65b05e612c5901908 (patch)
treee60f618e847d12c55c129aa3b534b5d495b2d313 /amount.cc
parent02168c782364a1a8641b4bed7ebf4a84cb6b3560 (diff)
downloadfork-ledger-6365b8b7a807351209330ba65b05e612c5901908.tar.gz
fork-ledger-6365b8b7a807351209330ba65b05e612c5901908.tar.bz2
fork-ledger-6365b8b7a807351209330ba65b05e612c5901908.zip
simplified some code
Diffstat (limited to 'amount.cc')
-rw-r--r--amount.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/amount.cc b/amount.cc
index 8a827d94..718ec1b4 100644
--- a/amount.cc
+++ b/amount.cc
@@ -57,7 +57,7 @@ static struct init_amounts {
mpz_clear(temp);
}
#endif
-} initializer;
+} _init;
static void mpz_round(mpz_t out, mpz_t value, int value_prec, int round_prec)
{
@@ -931,10 +931,9 @@ commodity_t * commodity_t::null_commodity =
commodity_t::find_commodity("", true);
#ifdef DO_CLEANUP
-
-static struct cleanup_commodities
+static struct cleanup_t
{
- ~cleanup_commodities() {
+ ~cleanup_t() {
if (commodity_t::updater)
delete commodity_t::updater;
@@ -945,8 +944,7 @@ static struct cleanup_commodities
delete (*i).second;
}
} _cleanup;
-
-#endif // DO_CLEANUP
+#endif
commodity_t * commodity_t::find_commodity(const std::string& symbol,
bool auto_create)