[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
@@ -155,7 +155,7 @@ bool generateDueDates (Task& parent, std::vector <Datetime>& allDue)
|
||||
|
||||
bool specificEnd = false;
|
||||
Datetime until;
|
||||
if (parent.get ("until") != "")
|
||||
if (!parent.get ("until").empty())
|
||||
{
|
||||
until = Datetime (parent.get ("until"));
|
||||
specificEnd = true;
|
||||
@@ -371,7 +371,7 @@ void updateRecurrenceMask (Task& task)
|
||||
auto uuid = task.get ("parent");
|
||||
Task parent;
|
||||
|
||||
if (uuid != "" &&
|
||||
if (!uuid.empty() &&
|
||||
Context::getContext ().tdb2.get (uuid, parent))
|
||||
{
|
||||
unsigned int index = strtol (task.get ("imask").c_str (), nullptr, 10);
|
||||
|
||||
Reference in New Issue
Block a user