::operator_hastag now uses contextTask for resolution.
This commit is contained in:
Paul Beckingham 2014-06-03 01:10:58 -04:00
parent 56a70b00c4
commit ca6940ba2e
3 changed files with 12 additions and 21 deletions

View file

@ -917,29 +917,17 @@ bool Variant::operator_nopartial (const Variant& other) const
}
////////////////////////////////////////////////////////////////////////////////
bool Variant::operator_hastag (const Variant& other) const
bool Variant::operator_hastag (const Variant& other, const Task& task) const
{
Variant left (*this); // tags
Variant right (other); // tag
left.cast (type_string);
Variant right (other);
right.cast (type_string);
std::vector <std::string> individual;
split (individual, left._string, ',');
std::vector <std::string>::iterator i;
for (i = individual.begin (); i != individual.end (); ++i)
if (*i == right._string)
return true;
return false;
return task.hasTag (right._string);
}
////////////////////////////////////////////////////////////////////////////////
bool Variant::operator_notag (const Variant& other) const
bool Variant::operator_notag (const Variant& other, const Task& task) const
{
return ! operator_hastag (other);
return ! operator_hastag (other, task);
}
////////////////////////////////////////////////////////////////////////////////