mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
[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:
parent
d43fa66489
commit
a331cceded
18 changed files with 132 additions and 132 deletions
|
@ -779,7 +779,7 @@ int Context::dispatch (std::string &out)
|
|||
{
|
||||
// Autocomplete args against keywords.
|
||||
std::string command = cli2.getCommand ();
|
||||
if (command != "")
|
||||
if (!command.empty())
|
||||
{
|
||||
updateXtermTitle ();
|
||||
updateVerbosity ();
|
||||
|
@ -1026,7 +1026,7 @@ void Context::getLimits (int& rows, int& lines)
|
|||
|
||||
// This is an integer specified as a filter (limit:10).
|
||||
auto limit = config.get ("limit");
|
||||
if (limit != "")
|
||||
if (!limit.empty())
|
||||
{
|
||||
if (limit == "page")
|
||||
{
|
||||
|
@ -1106,7 +1106,7 @@ void Context::staticInitialization ()
|
|||
void Context::createDefaultConfig ()
|
||||
{
|
||||
// Do we need to create a default rc?
|
||||
if (rc_file._data != "" && ! rc_file.exists ())
|
||||
if (!rc_file._data.empty() && ! rc_file.exists ())
|
||||
{
|
||||
if (config.getBoolean ("confirmation") &&
|
||||
! confirm ( format ("A configuration file could not be found in {1}\n\nWould you like a sample {2} created, so Taskwarrior can proceed?", home_dir, rc_file._data)))
|
||||
|
@ -1240,7 +1240,7 @@ void Context::updateXtermTitle ()
|
|||
void Context::updateVerbosity ()
|
||||
{
|
||||
auto command = cli2.getCommand ();
|
||||
if (command != "" &&
|
||||
if (!command.empty() &&
|
||||
command[0] == '_')
|
||||
{
|
||||
verbosity = {"nothing"};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue