First round of fixes based on cppcheck

https://github.com/fish-shell/fish-shell/issues/575
This commit is contained in:
ridiculousfish
2013-02-16 00:02:40 -08:00
parent 635c87d629
commit 6d522e6ed6
10 changed files with 49 additions and 64 deletions

View File

@@ -98,7 +98,7 @@ static void builtin_complete_add2(const wchar_t *cmd,
flags);
}
if (old_opt.size() == 0 && gnu_opt.size() == 0 && wcslen(short_opt) == 0)
if (old_opt.empty() && gnu_opt.empty() && wcslen(short_opt) == 0)
{
complete_add(cmd,
cmd_type,
@@ -204,7 +204,7 @@ static void builtin_complete_remove2(const wchar_t *cmd,
{
for (; *s; s++)
{
if (old_opt.size() == 0 && gnu_opt.size() == 0)
if (old_opt.empty() && gnu_opt.empty())
{
complete_remove(cmd,
cmd_type,