mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Code Cleanup
- Recycle an object. - A second argument to task show now gives an error.
This commit is contained in:
parent
7b0b3210a5
commit
109c6434f5
1 changed files with 3 additions and 2 deletions
|
@ -60,7 +60,7 @@ int CmdShow::execute (std::string& output)
|
||||||
// Obtain the arguments from the description. That way, things like '--'
|
// Obtain the arguments from the description. That way, things like '--'
|
||||||
// have already been handled.
|
// have already been handled.
|
||||||
std::vector <std::string> words = context.a3.extract_words ();
|
std::vector <std::string> words = context.a3.extract_words ();
|
||||||
if (words.size () > 2)
|
if (words.size () > 1)
|
||||||
throw std::string (STRING_CMD_SHOW_ARGS);
|
throw std::string (STRING_CMD_SHOW_ARGS);
|
||||||
|
|
||||||
int width = context.getWidth ();
|
int width = context.getWidth ();
|
||||||
|
@ -276,9 +276,10 @@ int CmdShow::execute (std::string& output)
|
||||||
if (section == "all")
|
if (section == "all")
|
||||||
section = "";
|
section = "";
|
||||||
|
|
||||||
|
std::string::size_type loc;
|
||||||
for (i = all.begin (); i != all.end (); ++i)
|
for (i = all.begin (); i != all.end (); ++i)
|
||||||
{
|
{
|
||||||
std::string::size_type loc = i->find (section, 0);
|
loc = i->find (section, 0);
|
||||||
if (loc != std::string::npos)
|
if (loc != std::string::npos)
|
||||||
{
|
{
|
||||||
// Look for unrecognized.
|
// Look for unrecognized.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue