diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-09 03:51:53 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-09 03:51:53 -0600 |
commit | 59f5ebe2dfe7cc93e36377f0251691e4de7b83b4 (patch) | |
tree | 479d00fc71f4c7c12cc6f37c01ab579e2119effb /src/chain.cc | |
parent | ef478079e7836a9817992a8f8982b40ce97eef55 (diff) | |
download | fork-ledger-59f5ebe2dfe7cc93e36377f0251691e4de7b83b4.tar.gz fork-ledger-59f5ebe2dfe7cc93e36377f0251691e4de7b83b4.tar.bz2 fork-ledger-59f5ebe2dfe7cc93e36377f0251691e4de7b83b4.zip |
Reworked the way that options are handled
Diffstat (limited to 'src/chain.cc')
-rw-r--r-- | src/chain.cc | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/chain.cc b/src/chain.cc index f8f0aeff..44b3db82 100644 --- a/src/chain.cc +++ b/src/chain.cc @@ -88,10 +88,9 @@ post_handler_ptr chain_pre_post_handlers(post_handler_ptr base_handler, predicate_t(report.HANDLER(forecast_while_).str(), report.what_to_keep()), report, - report.HANDLED(forecast_years_) ? - static_cast<std::size_t> - (report.HANDLER(forecast_years_).value.to_long()) : - 5UL); + (report.HANDLED(forecast_years_) ? + lexical_cast<std::size_t> + (report.HANDLER(forecast_years_).value) : 5UL)); forecast_handler->add_period_xacts(report.session.journal->period_xacts); handler.reset(forecast_handler); @@ -137,9 +136,9 @@ post_handler_ptr chain_post_handlers(post_handler_ptr base_handler, handler.reset (new truncate_xacts(handler, report.HANDLED(head_) ? - report.HANDLER(head_).value.to_int() : 0, + lexical_cast<int>(report.HANDLER(head_).value) : 0, report.HANDLED(tail_) ? - report.HANDLER(tail_).value.to_int() : 0)); + lexical_cast<int>(report.HANDLER(tail_).value) : 0)); // display_filter_posts adds virtual posts to the list to account // for changes in value of commodities, which otherwise would affect |