mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
Expression Refactor
- Refactoring complete. Arg objects now uses enumerations for _type and _category, which should help with performance.
This commit is contained in:
parent
9086f51d29
commit
7aa4efef8d
6 changed files with 331 additions and 247 deletions
|
@ -411,7 +411,7 @@ void Command::modify_task (
|
|||
{
|
||||
// Attributes are essentially name:value pairs, and correspond directly
|
||||
// to stored attributes.
|
||||
if (arg->_category == "attr")
|
||||
if (arg->_category == Arg::cat_attr)
|
||||
{
|
||||
std::string name;
|
||||
std::string value;
|
||||
|
@ -477,7 +477,7 @@ void Command::modify_task (
|
|||
// Tags need special handling because they are essentially a vector stored
|
||||
// in a single string, therefore Task::{add,remove}Tag must be called as
|
||||
// appropriate.
|
||||
else if (arg->_category == "tag")
|
||||
else if (arg->_category == Arg::cat_tag)
|
||||
{
|
||||
char type;
|
||||
std::string value;
|
||||
|
@ -490,7 +490,7 @@ void Command::modify_task (
|
|||
}
|
||||
|
||||
// Substitutions.
|
||||
else if (arg->_category == "subst")
|
||||
else if (arg->_category == Arg::cat_subst)
|
||||
{
|
||||
std::string from;
|
||||
std::string to;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue