From f7619a138d87839776a220adaed872ef53d596ac Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 6 Apr 2016 08:10:32 -0400 Subject: [PATCH] init: Propagated cli, rules, database and log --- src/commands/CmdTrack.cpp | 7 ++++++- src/commands/commands.h | 2 +- src/init.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/commands/CmdTrack.cpp b/src/commands/CmdTrack.cpp index dd6c86ce..e0d87916 100644 --- a/src/commands/CmdTrack.cpp +++ b/src/commands/CmdTrack.cpp @@ -25,10 +25,15 @@ //////////////////////////////////////////////////////////////////////////////// #include +#include #include //////////////////////////////////////////////////////////////////////////////// -int CmdTrack () +int CmdTrack ( + CLI& cli, + Rules& rules, + Database& database, + Log& log) { std::cout << "[track: record an old interval]\n"; diff --git a/src/commands/commands.h b/src/commands/commands.h index 00e81dcc..ee205328 100644 --- a/src/commands/commands.h +++ b/src/commands/commands.h @@ -50,7 +50,7 @@ int CmdReport (CLI&, Rules&, Database&, Extensions&, Log&); int CmdStart (CLI&, Rules&, Database&, Log&); int CmdStop (CLI&, Rules&, Database&, Log&); int CmdTags ( Rules&, Database&, Log&); -int CmdTrack ( ); +int CmdTrack (CLI&, Rules&, Database&, Log&); int CmdUndo ( ); #endif diff --git a/src/init.cpp b/src/init.cpp index 6fbf6860..280ff26f 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -222,7 +222,7 @@ int dispatchCommand ( else if (command == "start") status = CmdStart (cli, rules, database, log); else if (command == "stop") status = CmdStop (cli, rules, database, log); else if (command == "tags") status = CmdTags ( rules, database, log); - else if (command == "track") status = CmdTrack ( ); + else if (command == "track") status = CmdTrack (cli, rules, database, log); else if (command == "undo") status = CmdUndo ( ); } else