diff options
author | John Wiegley <johnw@newartisans.com> | 2010-06-05 16:15:09 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2010-06-05 16:15:09 -0400 |
commit | 290cac7b84b60305e185c140645c9bac2ca9fb0e (patch) | |
tree | c389da2eed81612ffb3868f61c31fa2534855fe1 /src/filters.cc | |
parent | f8bfbf8c250fa24bc9e26b9bf1eb64815a5a29ee (diff) | |
parent | 1417b40fdf0a92a85ab01f233c0ae076079901a2 (diff) | |
download | fork-ledger-290cac7b84b60305e185c140645c9bac2ca9fb0e.tar.gz fork-ledger-290cac7b84b60305e185c140645c9bac2ca9fb0e.tar.bz2 fork-ledger-290cac7b84b60305e185c140645c9bac2ca9fb0e.zip |
Merge branch 'next'
Diffstat (limited to 'src/filters.cc')
-rw-r--r-- | src/filters.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/filters.cc b/src/filters.cc index ad4b88a0..07278500 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -50,7 +50,7 @@ void post_splitter::print_title(const value_t& val) void post_splitter::flush() { - foreach (value_to_posts_map::value_type pair, posts_map) { + foreach (value_to_posts_map::value_type& pair, posts_map) { preflush_func(pair.first); foreach (post_t * post, pair.second) @@ -256,6 +256,7 @@ void anonymize_posts::operator()(post_t& post) create_temp_account_from_path(account_names, temps, xact.journal->master); post_t& temp = temps.copy_post(post, xact, new_account); temp.note = none; + temp.add_flags(POST_ANONYMIZED); (*handler)(temp); } @@ -894,7 +895,7 @@ void posts_as_equity::report_subtotal() value_t total = 0L; foreach (values_map::value_type& pair, values) { if (pair.second.value.is_balance()) { - foreach (balance_t::amounts_map::value_type amount_pair, + foreach (const balance_t::amounts_map::value_type& amount_pair, pair.second.value.as_balance().amounts) handle_value(amount_pair.second, pair.second.account, &xact, temps, handler); @@ -907,7 +908,7 @@ void posts_as_equity::report_subtotal() values.clear(); if (total.is_balance()) { - foreach (balance_t::amounts_map::value_type pair, + foreach (const balance_t::amounts_map::value_type& pair, total.as_balance().amounts) { post_t& balance_post = temps.create_post(xact, balance_account); balance_post.amount = - pair.second; @@ -1166,8 +1167,10 @@ void forecast_posts::flush() } date_t& begin = *(*least).first.start; +#if !defined(NO_ASSERTS) if ((*least).first.finish) assert(begin < *(*least).first.finish); +#endif // If the next date in the series for this periodic posting is more than 5 // years beyond the last valid post we generated, drop it from further |