Cleanup: Eliminated unused arguments

This commit is contained in:
Paul Beckingham 2015-10-12 15:13:43 -04:00
parent 8cf9788060
commit da4fd02cc5
5 changed files with 15 additions and 17 deletions

View file

@ -40,7 +40,7 @@
#endif
////////////////////////////////////////////////////////////////////////////////
int cmdDiagnostics (const std::vector <std::string>& args)
int cmdDiagnostics ()
{
// TODO Version
// TODO Platform

View file

@ -31,7 +31,7 @@
#include <text.h>
////////////////////////////////////////////////////////////////////////////////
int cmdHelp (const std::vector <std::string>& args)
int cmdHelp ()
{
std::cout << "Run 'man tasksh' for help.\n";
std::cout << "Run '! man tasksh' from inside tasksh.\n";

View file

@ -43,10 +43,10 @@
// a 'task' prefix could disambiguate.
// tasksh commands.
int cmdHelp (const std::vector <std::string>&);
int cmdDiagnostics (const std::vector <std::string>&);
int cmdReview (const std::vector <std::string>&);
int cmdShell (const std::vector <std::string>&);
int cmdHelp ();
int cmdDiagnostics ();
int cmdReview ();
int cmdShell ();
std::string promptCompose ();
std::string findTaskwarrior ();
@ -117,11 +117,11 @@ static int commandLoop ()
// Dispatch command.
if (closeEnough ("exit", args[0], 3)) status = -1;
else if (closeEnough ("quit", args[0], 3)) status = -1;
else if (closeEnough ("help", args[0], 3)) status = cmdHelp (args);
else if (closeEnough ("diagnostics", args[0], 3)) status = cmdDiagnostics (args);
else if (closeEnough ("review", args[0], 3)) status = cmdReview (args);
else if (closeEnough ("help", args[0], 3)) status = cmdHelp ();
else if (closeEnough ("diagnostics", args[0], 3)) status = cmdDiagnostics ();
else if (closeEnough ("review", args[0], 3)) status = cmdReview ();
else if (closeEnough ("exec", args[0], 3) ||
args[0][0] == '!') status = cmdShell (args);
args[0][0] == '!') status = cmdShell ();
else if (command != "")
{
command = "task " + command;

View file

@ -109,15 +109,13 @@ static void deleteTask (const std::string& uuid)
}
////////////////////////////////////////////////////////////////////////////////
static const std::string reviewNothing (
unsigned int width)
static const std::string reviewNothing ()
{
return "\nThere are no tasks needing review.\n\n";
}
////////////////////////////////////////////////////////////////////////////////
static const std::string reviewStart (
unsigned int total,
unsigned int width)
{
std::string welcome =
@ -184,11 +182,11 @@ static void reviewLoop (const std::vector <std::string>& uuids)
if (total == 0)
{
std::cout << reviewNothing (width);
std::cout << reviewNothing ();
return;
}
std::cout << reviewStart (total, width);
std::cout << reviewStart (width);
unsigned int current = 0;
while (current < total)
@ -233,7 +231,7 @@ static void reviewLoop (const std::vector <std::string>& uuids)
}
////////////////////////////////////////////////////////////////////////////////
int cmdReview (const std::vector <std::string>& args)
int cmdReview ()
{
// Configure 'reviewed' UDA, but only if necessary.
std::string input;

View file

@ -29,7 +29,7 @@
#include <string>
////////////////////////////////////////////////////////////////////////////////
int cmdShell (const std::vector <std::string>& args)
int cmdShell ()
{
/*
auto status = execute ("task",