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

@@ -135,7 +135,7 @@ void Hooks::onLaunch () const
Timer timer;
std::vector <std::string> matchingScripts = scripts ("on-launch");
if (!matchingScripts.empty())
if (matchingScripts.size ())
{
for (auto& script : matchingScripts)
{
@@ -188,7 +188,7 @@ void Hooks::onExit () const
Timer timer;
std::vector <std::string> matchingScripts = scripts ("on-exit");
if (!matchingScripts.empty())
if (matchingScripts.size ())
{
// Get the set of changed tasks.
std::vector <Task> tasks;
@@ -250,7 +250,7 @@ void Hooks::onAdd (Task& task) const
Timer timer;
std::vector <std::string> matchingScripts = scripts ("on-add");
if (!matchingScripts.empty())
if (matchingScripts.size ())
{
// Convert task to a vector of strings.
std::vector <std::string> input;
@@ -316,7 +316,7 @@ void Hooks::onModify (const Task& before, Task& after) const
Timer timer;
std::vector <std::string> matchingScripts = scripts ("on-modify");
if (!matchingScripts.empty())
if (matchingScripts.size ())
{
// Convert vector of tasks to a vector of strings.
std::vector <std::string> input;
@@ -601,7 +601,7 @@ int Hooks::callHookScript (
{
Context::getContext ().debug ("Hook: output");
for (const auto& i : output)
if (!i.empty())
if (i != "")
Context::getContext ().debug (" " + i);
Context::getContext ().debug (format ("Hook: Completed with status {1}", status));