From 27c589da975a4448960feb99a3b9774c116dc066 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 4 Nov 2020 16:26:03 +0100 Subject: filter/chain: remove unused field ChainFilter::Child::name --- src/filter/plugins/ChainFilterPlugin.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/filter/plugins/ChainFilterPlugin.cxx b/src/filter/plugins/ChainFilterPlugin.cxx index 07bca48af..878a4f2cb 100644 --- a/src/filter/plugins/ChainFilterPlugin.cxx +++ b/src/filter/plugins/ChainFilterPlugin.cxx @@ -31,12 +31,10 @@ class ChainFilter final : public Filter { struct Child { - const char *name; std::unique_ptr filter; - Child(const char *_name, - std::unique_ptr _filter) noexcept - :name(_name), filter(std::move(_filter)) {} + explicit Child(std::unique_ptr &&_filter) noexcept + :filter(std::move(_filter)) {} }; std::list children; @@ -50,13 +48,12 @@ public: explicit ChainFilter(AudioFormat _audio_format) :Filter(_audio_format) {} - void Append(const char *name, - std::unique_ptr filter) noexcept { + void Append(std::unique_ptr filter) noexcept { assert(out_audio_format.IsValid()); out_audio_format = filter->GetOutAudioFormat(); assert(out_audio_format.IsValid()); - children.emplace_back(name, std::move(filter)); + children.emplace_back(std::move(filter)); RewindFlush(); } @@ -121,7 +118,7 @@ PreparedChainFilter::Open(AudioFormat &in_audio_format) for (auto &child : children) { AudioFormat audio_format = chain->GetOutAudioFormat(); - chain->Append(child.name, child.Open(audio_format)); + chain->Append(child.Open(audio_format)); } return chain; -- cgit v1.2.3