diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-04 19:55:27 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-04 19:55:27 -0400 |
commit | 2d941730b1c60342be5b108d2d654723b3b7c2cb (patch) | |
tree | 6a3f4b7305857e85d2684670492007bafc3668d0 /src/journal.cc | |
parent | 73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe (diff) | |
download | fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.gz fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.bz2 fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.zip |
Largely removed all of Ledger's use of global variables, for the REPL's sake.
Diffstat (limited to 'src/journal.cc')
-rw-r--r-- | src/journal.cc | 14 |
1 files changed, 4 insertions, 10 deletions
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) |