From 0676ab7f47a201adb8621091a3db308255252794 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 2 Nov 2024 22:48:01 +0100 Subject: [PATCH] filter/two: use `if` with initializer --- src/filter/plugins/TwoFilters.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/filter/plugins/TwoFilters.cxx b/src/filter/plugins/TwoFilters.cxx index b93eba416..2ffcae1ad 100644 --- a/src/filter/plugins/TwoFilters.cxx +++ b/src/filter/plugins/TwoFilters.cxx @@ -16,8 +16,7 @@ TwoFilters::FilterPCM(std::span src) std::span 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);