[clang-tidy] Use .empty instead of comparing size
Found with readability-container-size-empty Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
committed by
Paul Beckingham
parent
d43fa66489
commit
a331cceded
@@ -279,7 +279,7 @@ static std::vector <Datetime> generateAllDueDates (const Task& templateTask)
|
||||
|
||||
bool end_in_sight = false;
|
||||
Datetime until;
|
||||
if (templateTask.get ("until") != "")
|
||||
if (!templateTask.get ("until").empty())
|
||||
{
|
||||
until = Datetime (templateTask.get ("until"));
|
||||
end_in_sight = true;
|
||||
@@ -296,7 +296,7 @@ static std::vector <Datetime> generateAllDueDates (const Task& templateTask)
|
||||
Datetime nextDue = generateNextDueDate (due, recur, lastN);
|
||||
|
||||
// TODO Safety.
|
||||
if (dueDates.size () && dueDates.back () == nextDue)
|
||||
if (!dueDates.empty() && dueDates.back () == nextDue)
|
||||
break;
|
||||
|
||||
// If nextDue > until, it means there are no more tasks to generate, so
|
||||
|
||||
Reference in New Issue
Block a user