init: Propagated database and log to CmdStop

This commit is contained in:
Paul Beckingham 2016-03-20 15:29:02 -04:00
parent 6e8fb261bb
commit a95ee17a3c
3 changed files with 6 additions and 3 deletions

View file

@ -25,10 +25,13 @@
////////////////////////////////////////////////////////////////////////////////
#include <cmake.h>
#include <commands.h>
#include <iostream>
////////////////////////////////////////////////////////////////////////////////
int CmdStop ()
int CmdStop (
Database& database,
Log& log)
{
std::cout << "[stop: end an open tracking interval]\n";

View file

@ -49,7 +49,7 @@ int CmdLog (const std::vector <std::string>&,
int CmdImport ( );
int CmdReport ( );
int CmdStart (const std::vector <std::string>&, Rules&, Database&, Log&);
int CmdStop ( );
int CmdStop ( Database&, Log&);
int CmdTags ( );
int CmdTrack ( );
int CmdUndo ( );

View file

@ -203,7 +203,7 @@ int dispatchCommand (
else if (closeEnough (allCommands[10], args[1], 2)) status = CmdLog (args, log);
else if (closeEnough (allCommands[11], args[1], 2)) status = CmdReport ( );
else if (closeEnough (allCommands[12], args[1], 2)) status = CmdStart (args, rules, database, log);
else if (closeEnough (allCommands[13], args[1], 2)) status = CmdStop ( );
else if (closeEnough (allCommands[13], args[1], 2)) status = CmdStop ( database, log);
else if (closeEnough (allCommands[14], args[1], 2)) status = CmdTags ( );
else if (closeEnough (allCommands[15], args[1], 2)) status = CmdTrack ( );
else if (closeEnough (allCommands[16], args[1], 2)) status = CmdUndo ( );