From 94e76ae87e883291d13320738fe165c7a2a2415b Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Fri, 30 Jul 2004 21:57:02 -0400 Subject: two major changes Complete changed the way format strings are handled. They are now compiled first, which is far more efficient than what was being done before. Also, there is now a global ledger::commodity_t::commodities map, which saves me from having to pass the current journal around to a zillion different functions, for the sole purpose of making sure that all commodity symbols that are parsed refer to the same commodity object. --- constraint.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'constraint.cc') diff --git a/constraint.cc b/constraint.cc index 4720e62b..fe00f4d2 100644 --- a/constraint.cc +++ b/constraint.cc @@ -93,10 +93,10 @@ bool matches(const masks_list& regexps, const std::string& str, bool constraints_t::matches_date_range(const std::time_t date) const { - if (have_beginning && difftime(date, begin_date) < 0) + if (begin_date != -1 && difftime(date, begin_date) < 0) return false; - if (have_ending && difftime(date, end_date) >= 0) + if (end_date != -1 && difftime(date, end_date) >= 0) return false; if (have_date_mask) { -- cgit v1.2.3