[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:
Rosen Penev 2019-09-27 19:12:49 -07:00 committed by Paul Beckingham
parent d43fa66489
commit a331cceded
18 changed files with 132 additions and 132 deletions

View file

@ -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);