diff options
author | John Wiegley <johnw@newartisans.com> | 2007-05-02 04:46:06 +0000 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2008-04-13 03:38:36 -0400 |
commit | f0508a9f86be63fc4f98e9943ce2f226339e6309 (patch) | |
tree | efe3bce9d361b64b1fc39ec450241f0e7dbb92c1 /src/commodity.cc | |
parent | c676527270e2e5b23de0e4b99e85010c76eb72b0 (diff) | |
download | fork-ledger-f0508a9f86be63fc4f98e9943ce2f226339e6309.tar.gz fork-ledger-f0508a9f86be63fc4f98e9943ce2f226339e6309.tar.bz2 fork-ledger-f0508a9f86be63fc4f98e9943ce2f226339e6309.zip |
In the middle of revising commodities.
Diffstat (limited to 'src/commodity.cc')
-rw-r--r-- | src/commodity.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/commodity.cc b/src/commodity.cc index 397e4667..dba1eb98 100644 --- a/src/commodity.cc +++ b/src/commodity.cc @@ -59,7 +59,7 @@ void commodity_base_t::add_price(const moment_t& date, const amount_t& price) { if (! history) - history = new history_t; + history = history_t(); history_map::iterator i = history->prices.find(date); if (i != history->prices.end()) { @@ -77,7 +77,7 @@ bool commodity_base_t::remove_price(const moment_t& date) history_map::size_type n = history->prices.erase(date); if (n > 0) { if (history->prices.empty()) - history = NULL; + history.reset(); return true; } } |