diff options
-rw-r--r-- | src/filters.cc | 6 | ||||
-rw-r--r-- | src/times.h | 5 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/filters.cc b/src/filters.cc index 4ccdf66c..29f517d6 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -450,7 +450,7 @@ void interval_xacts::operator()(xact_t& xact) if (interval) { if (! started) { if (! is_valid(interval.begin)) - interval.start(date); + interval.set_start(date); start = interval.begin; started = true; } @@ -600,7 +600,7 @@ void budget_xacts::report_budget_items(const date_t& date) foreach (pending_xacts_list::value_type& pair, pending_xacts) { date_t& begin = pair.first.begin; if (! is_valid(begin)) { - pair.first.start(date); + pair.first.set_start(date); begin = pair.first.begin; } @@ -667,7 +667,7 @@ void forecast_xacts::add_xact(const interval_t& period, xact_t& xact) interval_t& i = pending_xacts.back().first; if (! is_valid(i.begin)) { - i.start(current_date); + i.set_start(current_date); i.begin = i.increment(i.begin); } else { while (i.begin < current_date) diff --git a/src/times.h b/src/times.h index 7e9d7ac0..6abd2109 100644 --- a/src/times.h +++ b/src/times.h @@ -140,9 +140,10 @@ struct interval_t return years != 0 || months != 0 || days != 0; } - void start(const date_t& moment) { - begin = first(moment); + void set_start(const date_t& moment) { + begin = moment; } + date_t first(const optional<date_t>& moment = none) const; date_t increment(const date_t&) const; |