clang-tidy: replace loop with std::all_of

Found with readability-use-anyofallof

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2021-08-17 20:13:40 -07:00
parent bedcf1cce5
commit 20d74bb07e
1 changed files with 1 additions and 5 deletions

View File

@ -367,11 +367,7 @@ SnapcastOutput::IsDrained() const noexcept
if (!chunks.empty())
return false;
for (const auto &client : clients)
if (!client.IsDrained())
return false;
return true;
return std::all_of(clients.begin(), clients.end(), [](auto&& c){ return c.IsDrained(); });
}
void