mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Task: Code cleanup
This commit is contained in:
parent
f04a6177ac
commit
77ae4a3613
1 changed files with 3 additions and 3 deletions
|
@ -1439,7 +1439,7 @@ void Task::validate (bool applyDefault /* = true */)
|
|||
|
||||
#ifdef PRODUCT_TASKWARRIOR
|
||||
// Provide an entry date unless user already specified one.
|
||||
if (!has ("entry") || get ("entry") == "")
|
||||
if (! has ("entry") || get ("entry") == "")
|
||||
setAsNow ("entry");
|
||||
|
||||
// Completed tasks need an end date, so inherit the entry date.
|
||||
|
@ -1448,7 +1448,7 @@ void Task::validate (bool applyDefault /* = true */)
|
|||
setAsNow ("end");
|
||||
|
||||
// Provide an entry date unless user already specified one.
|
||||
if (!has ("modified") || get ("modified") == "")
|
||||
if (! has ("modified") || get ("modified") == "")
|
||||
setAsNow ("modified");
|
||||
|
||||
if (applyDefault && (! has ("parent") || get ("parent") == ""))
|
||||
|
@ -1520,7 +1520,7 @@ void Task::validate (bool applyDefault /* = true */)
|
|||
// 3) To generate errors when the inconsistencies are not fixable
|
||||
|
||||
// There is no fixing a missing description.
|
||||
if (!has ("description"))
|
||||
if (! has ("description"))
|
||||
throw std::string (STRING_TASK_VALID_DESC);
|
||||
else if (get ("description") == "")
|
||||
throw std::string (STRING_TASK_VALID_BLANK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue