diff options
author | Max Kellermann <max@musicpd.org> | 2020-11-04 16:26:03 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-11-04 16:26:50 +0100 |
commit | 27c589da975a4448960feb99a3b9774c116dc066 (patch) | |
tree | a1a816fb40c57a6dfde467447b5b77d6173a9fa6 /src | |
parent | 6484af472b83a512e559616d44261526e62cc955 (diff) |
filter/chain: remove unused field ChainFilter::Child::name
Diffstat (limited to 'src')
-rw-r--r-- | src/filter/plugins/ChainFilterPlugin.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
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> filter; - Child(const char *_name, - std::unique_ptr<Filter> _filter) noexcept - :name(_name), filter(std::move(_filter)) {} + explicit Child(std::unique_ptr<Filter> &&_filter) noexcept + :filter(std::move(_filter)) {} }; std::list<Child> children; @@ -50,13 +48,12 @@ public: explicit ChainFilter(AudioFormat _audio_format) :Filter(_audio_format) {} - void Append(const char *name, - std::unique_ptr<Filter> filter) noexcept { + void Append(std::unique_ptr<Filter> 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; |