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 #endif
//////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////
int cmdDiagnostics (const std::vector <std::string>& args) int cmdDiagnostics ()
{ {
// TODO Version // TODO Version
// TODO Platform // TODO Platform

View file

@ -31,7 +31,7 @@
#include <text.h> #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' for help.\n";
std::cout << "Run '! man tasksh' from inside tasksh.\n"; std::cout << "Run '! man tasksh' from inside tasksh.\n";

View file

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

View file

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

View file

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