filter/two: use `if` with initializer

This commit is contained in:
Max Kellermann 2024-11-02 22:48:01 +01:00
parent fc5d258890
commit 0676ab7f47
1 changed files with 1 additions and 2 deletions

View File

@ -16,8 +16,7 @@ TwoFilters::FilterPCM(std::span<const std::byte> src)
std::span<const std::byte>
TwoFilters::Flush()
{
auto result = first->Flush();
if (result.data() != nullptr)
if (auto result = first->Flush(); result.data() != nullptr)
/* Flush() output from the first Filter must be
filtered by the second Filter */
return second->FilterPCM(result);