summaryrefslogtreecommitdiff
path: root/src/item.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-03 13:03:10 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-03 13:03:10 -0400
commit43c4636d9d3a8a3bebc6565b2f1fdd1aebe9849a (patch)
treeb8cd70315ef339c785bffecf83a52826def97914 /src/item.cc
parent3434650848e500d605447388ef7e069ee1515b72 (diff)
downloadfork-ledger-43c4636d9d3a8a3bebc6565b2f1fdd1aebe9849a.tar.gz
fork-ledger-43c4636d9d3a8a3bebc6565b2f1fdd1aebe9849a.tar.bz2
fork-ledger-43c4636d9d3a8a3bebc6565b2f1fdd1aebe9849a.zip
Removed the global references to session->report.
Diffstat (limited to 'src/item.cc')
-rw-r--r--src/item.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/item.cc b/src/item.cc
index 2fe7601c..175797ff 100644
--- a/src/item.cc
+++ b/src/item.cc
@@ -35,6 +35,8 @@
namespace ledger {
+bool item_t::use_effective_date = false;
+
bool item_t::has_tag(const string& tag) const
{
if (! metadata)
@@ -224,7 +226,7 @@ value_t get_comment(item_t& item)
optional<date_t> item_t::date() const
{
- if (session_t::current->report->use_effective_date && _date_eff)
+ if (use_effective_date && _date_eff)
return effective_date();
else
return actual_date();
@@ -293,7 +295,7 @@ expr_t::ptr_op_t item_t::lookup(const string& name)
break;
}
- return session_t::current->report->lookup(name);
+ return session_t::current->global_scope->lookup(name);
}
bool item_t::valid() const