[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

@@ -1900,7 +1900,7 @@ void Variant::cast (const enum type new_type)
break;
}
if (dateFormat != "")
if (!dateFormat.empty())
{
_date = Datetime (_string, dateFormat).toEpoch ();
break;
@@ -1961,7 +1961,7 @@ bool Variant::trivial () const
{
return (_type == type_integer && _integer == 0) ||
(_type == type_real && _real == 0.0) ||
(_type == type_string && _string == "") ||
(_type == type_string && _string.empty()) ||
(_type == type_date && _date == 0) ||
(_type == type_duration && _duration == 0);
}