From c96635fe605f142f0402e5728e5d2a49b48c1453 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 29 Jan 2009 19:11:36 -0400 Subject: Refactored the textual parser, to allow easy extensions in Python. --- src/timelog.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/timelog.cc') 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 -- cgit v1.2.3