Expression Refactor

- Refactoring complete.  Arg objects now uses enumerations for _type
  and _category, which should help with performance.
This commit is contained in:
Paul Beckingham 2011-08-21 01:06:50 -04:00
parent 9086f51d29
commit 7aa4efef8d
6 changed files with 331 additions and 247 deletions

View file

@ -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;