diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-05 17:50:17 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-05 17:50:17 -0600 |
commit | 97dbf379d5e44c80c748483a688502b1cec8f075 (patch) | |
tree | 262c54e08cd86cbcdcf9f87de261fc1c56305980 /src/textual.cc | |
parent | ff9cf572fe5054f2e5c5d7ab4e68d63011e4a38a (diff) | |
download | fork-ledger-97dbf379d5e44c80c748483a688502b1cec8f075.tar.gz fork-ledger-97dbf379d5e44c80c748483a688502b1cec8f075.tar.bz2 fork-ledger-97dbf379d5e44c80c748483a688502b1cec8f075.zip |
Rewrote the way annotated commodities are managed
The new scheme should be much more efficient, and allows for future
growth of what annotations may appear on a commodity.
Diffstat (limited to 'src/textual.cc')
-rw-r--r-- | src/textual.cc | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/textual.cc b/src/textual.cc index 2493dc0d..7bf67347 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -1031,17 +1031,10 @@ void instance_t::commodity_directive(char * line) } } -void instance_t::commodity_alias_directive(commodity_t&, string) +void instance_t::commodity_alias_directive(commodity_t& comm, string alias) { -#if 0 trim(alias); - std::pair<commodity_pool_t::commodities_map::iterator, bool> result - = commodity_pool_t::current_pool->commodities.insert - (commodity_pool_t::commodities_map::value_type(alias, &comm)); - if (! result.second) - throw_(parse_error, - _("Cannot use existing commodity name as an alias: %1") << alias); -#endif + commodity_pool_t::current_pool->alias(alias, comm); } void instance_t::commodity_format_directive(commodity_t&, string format) |