mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-01 09:17:19 +02:00
Parser
- ::findOverrides moves branch pruning out of the iterated loop. - Now scans all nodes.
This commit is contained in:
parent
3fce252461
commit
dbc55b5f73
1 changed files with 1 additions and 3 deletions
|
@ -498,7 +498,6 @@ void Parser::findOverrides ()
|
||||||
if (arg.find ("rc:") == 0)
|
if (arg.find ("rc:") == 0)
|
||||||
{
|
{
|
||||||
(*i)->unTag ("?");
|
(*i)->unTag ("?");
|
||||||
(*i)->removeAllBranches ();
|
|
||||||
(*i)->tag ("RC");
|
(*i)->tag ("RC");
|
||||||
(*i)->attribute ("file", arg.substr (3));
|
(*i)->attribute ("file", arg.substr (3));
|
||||||
}
|
}
|
||||||
|
@ -511,7 +510,6 @@ void Parser::findOverrides ()
|
||||||
if (sep != std::string::npos)
|
if (sep != std::string::npos)
|
||||||
{
|
{
|
||||||
(*i)->unTag ("?");
|
(*i)->unTag ("?");
|
||||||
(*i)->removeAllBranches ();
|
|
||||||
(*i)->tag ("CONFIG");
|
(*i)->tag ("CONFIG");
|
||||||
(*i)->attribute ("name", arg.substr (3, sep - 3));
|
(*i)->attribute ("name", arg.substr (3, sep - 3));
|
||||||
(*i)->attribute ("value", arg.substr (sep + 1));
|
(*i)->attribute ("value", arg.substr (sep + 1));
|
||||||
|
@ -529,7 +527,7 @@ void Parser::getOverrides (
|
||||||
File& rc)
|
File& rc)
|
||||||
{
|
{
|
||||||
std::vector <Tree*> nodes;
|
std::vector <Tree*> nodes;
|
||||||
collect (nodes, collectLeaf);
|
collect (nodes, collectAll);
|
||||||
std::vector <Tree*>::iterator i;
|
std::vector <Tree*>::iterator i;
|
||||||
for (i = nodes.begin (); i != nodes.end (); ++i)
|
for (i = nodes.begin (); i != nodes.end (); ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue