feedback: Replace taskDiff method by Task inequality operator
This commit is contained in:
committed by
Paul Beckingham
parent
efab724802
commit
4042cbf964
@@ -124,7 +124,7 @@ int CmdDenotate::execute (std::string& output)
|
||||
}
|
||||
}
|
||||
|
||||
if (taskDiff (before, task))
|
||||
if (before != task)
|
||||
{
|
||||
std::string question = format (STRING_CMD_DENO_CONFIRM,
|
||||
task.id,
|
||||
|
||||
@@ -184,10 +184,10 @@ void CmdImport::importSingleTask (json::object* obj)
|
||||
{
|
||||
// "modified:" is automatically set to the current time when a task is
|
||||
// changed. If the imported task has a modification timestamp we need
|
||||
// to ignore it in taskDiff() in order to check for meaningful
|
||||
// to ignore it in task comparison in order to check for meaningful
|
||||
// differences. Setting it to the previous value achieves just that.
|
||||
task.set ("modified", before.get ("modified"));
|
||||
if (taskDiff (before, task))
|
||||
if (before != task)
|
||||
{
|
||||
CmdModify modHelper;
|
||||
modHelper.checkConsistency (before, task);
|
||||
|
||||
@@ -76,7 +76,7 @@ int CmdModify::execute (std::string& output)
|
||||
Task before (task);
|
||||
task.modify (Task::modReplace);
|
||||
|
||||
if (taskDiff (before, task))
|
||||
if (before != task)
|
||||
{
|
||||
// Abort if change introduces inconsistencies.
|
||||
checkConsistency(before, task);
|
||||
|
||||
Reference in New Issue
Block a user