From 2d941730b1c60342be5b108d2d654723b3b7c2cb Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 4 Feb 2009 19:55:27 -0400 Subject: Largely removed all of Ledger's use of global variables, for the REPL's sake. --- src/journal.cc | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/journal.cc') diff --git a/src/journal.cc b/src/journal.cc index c1da2fc9..403e7c81 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -36,12 +36,6 @@ namespace ledger { const string version = PACKAGE_VERSION; -journal_t::journal_t() : basket(NULL) -{ - TRACE_CTOR(journal_t, ""); - master = session_t::current->master.get(); -} - journal_t::~journal_t() { TRACE_DTOR(journal_t); @@ -70,22 +64,22 @@ journal_t::~journal_t() void journal_t::add_account(account_t * acct) { - session_t::current->add_account(acct); + master->add_account(acct); } bool journal_t::remove_account(account_t * acct) { - return session_t::current->remove_account(acct); + return master->remove_account(acct); } account_t * journal_t::find_account(const string& name, bool auto_create) { - return session_t::current->find_account(name, auto_create); + return master->find_account(name, auto_create); } account_t * journal_t::find_account_re(const string& regexp) { - return session_t::current->find_account_re(regexp); + return master->find_account_re(regexp); } bool journal_t::add_entry(entry_t * entry) -- cgit v1.2.3