From 6365b8b7a807351209330ba65b05e612c5901908 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 22 Aug 2004 18:34:18 -0400 Subject: simplified some code --- amount.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'amount.cc') 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) -- cgit v1.2.3