diff options
author | John Wiegley <johnw@newartisans.com> | 2004-08-22 18:34:18 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2004-08-22 18:34:18 -0400 |
commit | 6365b8b7a807351209330ba65b05e612c5901908 (patch) | |
tree | e60f618e847d12c55c129aa3b534b5d495b2d313 /amount.cc | |
parent | 02168c782364a1a8641b4bed7ebf4a84cb6b3560 (diff) | |
download | fork-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.cc | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -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) |