Task: Renamed ::getUDAOrphans to ::getUDAOrphanUUIDs

This commit is contained in:
Paul Beckingham 2016-12-31 12:27:20 -05:00
parent fdcb084df6
commit 6c9660aee8
3 changed files with 7 additions and 6 deletions

View file

@ -1336,12 +1336,15 @@ void Task::removeTag (const std::string& tag)
#ifdef PRODUCT_TASKWARRIOR
////////////////////////////////////////////////////////////////////////////////
// A UDA Orphan is an attribute that is not represented in context.columns.
void Task::getUDAOrphans (std::vector <std::string>& names) const
std::vector <std::string> Task::getUDAOrphanUUIDs () const
{
std::vector <std::string> orphans;
for (auto& it : data)
if (it.first.compare (0, 11, "annotation_", 11) != 0)
if (context.columns.find (it.first) == context.columns.end ())
names.push_back (it.first);
orphans.push_back (it.first);
return orphans;
}
////////////////////////////////////////////////////////////////////////////////