mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
recur: Code cleanup
This commit is contained in:
parent
81e3d3bb42
commit
2da0656b5e
1 changed files with 2 additions and 2 deletions
|
@ -378,14 +378,14 @@ Datetime getNextRecurrence (Datetime& current, std::string& period)
|
||||||
// update it's mask.
|
// update it's mask.
|
||||||
void updateRecurrenceMask (Task& task)
|
void updateRecurrenceMask (Task& task)
|
||||||
{
|
{
|
||||||
std::string uuid = task.get ("parent");
|
auto uuid = task.get ("parent");
|
||||||
Task parent;
|
Task parent;
|
||||||
|
|
||||||
if (uuid != "" &&
|
if (uuid != "" &&
|
||||||
context.tdb2.get (uuid, parent))
|
context.tdb2.get (uuid, parent))
|
||||||
{
|
{
|
||||||
unsigned int index = strtol (task.get ("imask").c_str (), NULL, 10);
|
unsigned int index = strtol (task.get ("imask").c_str (), NULL, 10);
|
||||||
std::string mask = parent.get ("mask");
|
auto mask = parent.get ("mask");
|
||||||
if (mask.length () > index)
|
if (mask.length () > index)
|
||||||
{
|
{
|
||||||
mask[index] = (task.getStatus () == Task::pending) ? '-'
|
mask[index] = (task.getStatus () == Task::pending) ? '-'
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue