Revert "[clang-tidy] Use .empty instead of comparing size"

This reverts commit a331cceded.
This commit is contained in:
Paul Beckingham 2020-12-05 16:18:15 -05:00
parent b2d46a1eba
commit 3e0a428185
18 changed files with 132 additions and 132 deletions

View file

@ -58,7 +58,7 @@ std::vector <Task> dependencyGetBlocking (const Task& task)
auto depends = task.get ("depends");
std::vector <Task> blocking;
if (!depends.empty())
if (depends != "")
for (auto& it : Context::getContext ().tdb2.pending.get_tasks ())
if (it.getStatus () != Task::completed &&
it.getStatus () != Task::deleted &&
@ -153,7 +153,7 @@ void dependencyChainOnComplete (Task& task)
auto blocking = dependencyGetBlocking (task);
// If the task is anything but the tail end of a dependency chain.
if (!blocking.empty())
if (blocking.size ())
{
auto blocked = dependencyGetBlocked (task);
@ -168,7 +168,7 @@ void dependencyChainOnComplete (Task& task)
}
// If there are both blocking and blocked tasks, the chain is broken.
if (!blocked.empty())
if (blocked.size ())
{
if (Context::getContext ().config.getBoolean ("dependency.reminder"))
{
@ -211,7 +211,7 @@ void dependencyChainOnStart (Task& task)
// If the task is anything but the tail end of a dependency chain, nag about
// broken chain.
if (!blocking.empty())
if (blocking.size ())
{
std::cout << format (STRING_DEPEND_BLOCKED, task.identifier ())
<< '\n';