Replace direct Task.data access with a temp getter (syntactic refactor)
Now this getter, `data_removeme`, can easily be grepped out and replaced, one usage at a time in small PRs.
This commit is contained in:
committed by
Tomas Babej
parent
3a00956144
commit
dede40bc4e
@@ -128,7 +128,7 @@ int CmdDenotate::execute (std::string&)
|
||||
}
|
||||
}
|
||||
|
||||
if (before.data != task.data)
|
||||
if (before.data_removeme () != task.data_removeme ())
|
||||
{
|
||||
auto question = format ("Denotate task {1} '{2}'?",
|
||||
task.identifier (true),
|
||||
|
||||
@@ -198,7 +198,7 @@ void CmdImport::importSingleTask (json::object* obj)
|
||||
if (hasGeneratedEnd)
|
||||
task.set ("end", before.get ("end"));
|
||||
|
||||
if (before.data != task.data)
|
||||
if (before.data_removeme() != task.data_removeme())
|
||||
{
|
||||
CmdModify modHelper;
|
||||
modHelper.checkConsistency (before, task);
|
||||
|
||||
@@ -79,7 +79,7 @@ int CmdModify::execute (std::string&)
|
||||
Task before (task);
|
||||
task.modify (Task::modReplace);
|
||||
|
||||
if (before.data != task.data)
|
||||
if (before.data_removeme () != task.data_removeme ())
|
||||
{
|
||||
// Abort if change introduces inconsistencies.
|
||||
checkConsistency(before, task);
|
||||
|
||||
@@ -134,7 +134,7 @@ int CmdUDAs::execute (std::string& output)
|
||||
std::map <std::string, int> orphans;
|
||||
for (auto& i : filtered)
|
||||
{
|
||||
for (auto& att : i.data)
|
||||
for (auto& att : i.data_removeme ())
|
||||
if (! Task::isAnnotationAttr (att.first) &&
|
||||
! Task::isTagAttr (att.first) &&
|
||||
! Task::isDepAttr (att.first) &&
|
||||
|
||||
Reference in New Issue
Block a user