summaryrefslogtreecommitdiff
path: root/src/commodity.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-07 22:50:56 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-07 22:50:56 -0400
commit6f37d88391dc35e92f362563411208d2430d1c74 (patch)
tree9c8219c79fe4638e80a87927d7ba466c3a7e116d /src/commodity.cc
parentaec5020d34bb809efa3e243a1264dd66b8014748 (diff)
downloadfork-ledger-6f37d88391dc35e92f362563411208d2430d1c74.tar.gz
fork-ledger-6f37d88391dc35e92f362563411208d2430d1c74.tar.bz2
fork-ledger-6f37d88391dc35e92f362563411208d2430d1c74.zip
Fixed a mistakenly const parameter.
Diffstat (limited to 'src/commodity.cc')
-rw-r--r--src/commodity.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commodity.cc b/src/commodity.cc
index 4b73b41f..91bcaba9 100644
--- a/src/commodity.cc
+++ b/src/commodity.cc
@@ -988,7 +988,7 @@ commodity_t * commodity_pool_t::find_or_create(commodity_t& comm,
return create(comm, details, name);
}
-void commodity_pool_t::parse_commodity_price(const char * optarg)
+void commodity_pool_t::parse_commodity_price(char * optarg)
{
char * equals = std::strchr(optarg, '=');
if (! equals)
@@ -1001,8 +1001,8 @@ void commodity_pool_t::parse_commodity_price(const char * optarg)
std::string symbol(optarg, 0, equals - optarg);
amount_t price(equals + 1);
- if (commodity_t * commodity = commodity_t::find_or_create(symbol))
- commodity->add_price(datetime_t::now, price);
+ if (commodity_t * commodity = find_or_create(symbol))
+ commodity->add_price(CURRENT_TIME(), price);
}
} // namespace ledger