diff options
author | John Wiegley <johnw@newartisans.com> | 2009-01-29 19:11:36 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-01-29 19:11:36 -0400 |
commit | c96635fe605f142f0402e5728e5d2a49b48c1453 (patch) | |
tree | a09d0bf7171a363e47c945f6e7f32b715ec10c4f /src/timelog.cc | |
parent | 3c0e2138fc781b902e966459460943f8f838aa94 (diff) | |
download | fork-ledger-c96635fe605f142f0402e5728e5d2a49b48c1453.tar.gz fork-ledger-c96635fe605f142f0402e5728e5d2a49b48c1453.tar.bz2 fork-ledger-c96635fe605f142f0402e5728e5d2a49b48c1453.zip |
Refactored the textual parser, to allow easy extensions in Python.
Diffstat (limited to 'src/timelog.cc')
-rw-r--r-- | src/timelog.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/timelog.cc b/src/timelog.cc index fc5f0a3e..31c8e6da 100644 --- a/src/timelog.cc +++ b/src/timelog.cc @@ -29,6 +29,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "timelog.h" + namespace ledger { namespace { @@ -119,8 +121,8 @@ time_log_t::~time_log_t() } void time_log_t::clock_in(const datetime_t& checkin, - account_t * account = NULL, - const string& desc = "") + account_t * account, + const string& desc) { time_entry_t event(checkin, account, desc); @@ -133,13 +135,14 @@ void time_log_t::clock_in(const datetime_t& checkin, } void time_log_t::clock_out(const datetime_t& checkin, - account_t * account = NULL, - const string& desc = "") + account_t * account, + const string& desc) { if (time_entries.empty()) throw std::logic_error("Timelog check-out event without a check-in"); - clock_out_from_timelog(time_entries, checkin, account, desc, journal); + clock_out_from_timelog(time_entries, checkin, account, desc.c_str(), + journal); } } // namespace ledger |