[clang-tidy] simplify boolean expressions

Found with readability-simplify-boolean-expr Signed-off-by: 's avatarRosen Penev <rosenp@gmail.com>
parent bc6eca21
...@@ -283,7 +283,7 @@ static void help(void) ...@@ -283,7 +283,7 @@ static void help(void)
"Options:\n"); "Options:\n");
for (const auto &i : option_defs) for (const auto &i : option_defs)
if(i.HasDescription() == true) // hide hidden options from help print if(i.HasDescription()) // hide hidden options from help print
PrintOption(i); PrintOption(i);
exit(EXIT_SUCCESS); exit(EXIT_SUCCESS);
......
...@@ -863,10 +863,7 @@ IsFilterSupported(const ISongFilter &f) noexcept ...@@ -863,10 +863,7 @@ IsFilterSupported(const ISongFilter &f) noexcept
return true; return true;
const auto tag = Convert(t->GetTagType()); const auto tag = Convert(t->GetTagType());
if (tag == MPD_TAG_COUNT) return tag != MPD_TAG_COUNT;
return false;
return true;
} else if (auto u = dynamic_cast<const UriSongFilter *>(&f)) { } else if (auto u = dynamic_cast<const UriSongFilter *>(&f)) {
if (u->IsNegated()) if (u->IsNegated())
// TODO implement // TODO implement
......
...@@ -102,10 +102,7 @@ FullyBufferedSocket::OnSocketReady(unsigned flags) noexcept ...@@ -102,10 +102,7 @@ FullyBufferedSocket::OnSocketReady(unsigned flags) noexcept
return false; return false;
} }
if (!BufferedSocket::OnSocketReady(flags)) return BufferedSocket::OnSocketReady(flags);
return false;
return true;
} }
void void
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment