Argument Parsing
- Obsoleted Command::exectute 'commandLine' argument. It is worse than unnecessary, it is an uncategorized raw argument string, which is only really useful for the 'execute' command, which itself now calls Arguments::combine to reconstruct the command line string.
This commit is contained in:
@@ -48,7 +48,7 @@ CmdCalendar::CmdCalendar ()
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
int CmdCalendar::execute (const std::string&, std::string& output)
|
||||
int CmdCalendar::execute (std::string& output)
|
||||
{
|
||||
int rc = 0;
|
||||
|
||||
@@ -114,8 +114,9 @@ int CmdCalendar::execute (const std::string&, std::string& output)
|
||||
int argMonth = 0;
|
||||
int argYear = 0;
|
||||
bool argWholeYear = false;
|
||||
std::vector <std::string> args = context.args.list ();
|
||||
std::vector <std::string>::iterator arg;
|
||||
for (arg = context.args.begin (); arg != context.args.end (); ++arg)
|
||||
for (arg = args.begin (); arg != args.end (); ++arg)
|
||||
{
|
||||
// Some version of "calendar".
|
||||
if (autoComplete (lowerCase (*arg), commandNames, matches) == 1)
|
||||
@@ -353,7 +354,7 @@ int CmdCalendar::execute (const std::string&, std::string& output)
|
||||
context.sequence.clear ();
|
||||
|
||||
std::string output;
|
||||
context.commands[report]->execute (context.commandLine, output);
|
||||
context.commands[report]->execute (output);
|
||||
out << output;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user