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

@@ -208,8 +208,8 @@ std::string taskInfoDifferences (
if (name != "uuid" &&
name != "modified" &&
before.get (name) != after.get (name) &&
!before.get (name).empty() &&
!after.get (name).empty())
before.get (name) != "" &&
after.get (name) != "")
{
if (name == "depends")
{
@@ -245,10 +245,10 @@ std::string renderAttribute (const std::string& name, const std::string& value,
Column* col = Context::getContext ().columns[name];
if (col &&
col->type () == "date" &&
!value.empty())
value != "")
{
Datetime d ((time_t)strtol (value.c_str (), nullptr, 10));
if (format.empty())
if (format == "")
return d.toString (Context::getContext ().config.get ("dateformat"));
return d.toString (format);
@@ -379,7 +379,7 @@ void feedback_unblocked (const Task& task)
for (auto& i : blocked)
{
auto blocking = dependencyGetBlocking (i);
if (blocking.empty())
if (blocking.size () == 0)
{
if (i.id)
std::cout << format ("Unblocked {1} '{2}'.",
@@ -402,7 +402,7 @@ void feedback_unblocked (const Task& task)
///////////////////////////////////////////////////////////////////////////////
void feedback_backlog ()
{
if (!Context::getContext ().config.get ("taskd.server").empty() &&
if (Context::getContext ().config.get ("taskd.server") != "" &&
Context::getContext ().verbose ("sync"))
{
int count = 0;
@@ -423,7 +423,7 @@ std::string onProjectChange (Task& task, bool scope /* = true */)
std::stringstream msg;
std::string project = task.get ("project");
if (!project.empty())
if (project != "")
{
if (scope)
msg << format ("The project '{1}' has changed.", project)