From 03cf6591c0d688dc3303ae73ee088a82fb216882 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 27 Dec 2017 11:21:43 +0100 Subject: [PATCH] output/Source: convert prepared_filter to reference --- src/output/Source.cxx | 6 +++--- src/output/Source.hxx | 4 ++-- src/output/Thread.cxx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/output/Source.cxx b/src/output/Source.cxx index 15c63b1da..72b602c1e 100644 --- a/src/output/Source.cxx +++ b/src/output/Source.cxx @@ -33,7 +33,7 @@ AudioFormat AudioOutputSource::Open(const AudioFormat audio_format, const MusicPipe &_pipe, PreparedFilter *prepared_replay_gain_filter, PreparedFilter *prepared_other_replay_gain_filter, - PreparedFilter *prepared_filter) + PreparedFilter &prepared_filter) { assert(audio_format.IsValid()); @@ -90,7 +90,7 @@ void AudioOutputSource::OpenFilter(AudioFormat audio_format, PreparedFilter *prepared_replay_gain_filter, PreparedFilter *prepared_other_replay_gain_filter, - PreparedFilter *prepared_filter) + PreparedFilter &prepared_filter) try { assert(audio_format.IsValid()); @@ -107,7 +107,7 @@ try { prepared_other_replay_gain_filter->Open(audio_format); } - filter_instance = prepared_filter->Open(audio_format); + filter_instance = prepared_filter.Open(audio_format); } catch (...) { CloseFilter(); throw; diff --git a/src/output/Source.hxx b/src/output/Source.hxx index 0e962b779..2de8564e2 100644 --- a/src/output/Source.hxx +++ b/src/output/Source.hxx @@ -136,7 +136,7 @@ public: AudioFormat Open(AudioFormat audio_format, const MusicPipe &_pipe, PreparedFilter *prepared_replay_gain_filter, PreparedFilter *prepared_other_replay_gain_filter, - PreparedFilter *prepared_filter); + PreparedFilter &prepared_filter); void Close() noexcept; void Cancel() noexcept; @@ -195,7 +195,7 @@ private: void OpenFilter(AudioFormat audio_format, PreparedFilter *prepared_replay_gain_filter, PreparedFilter *prepared_other_replay_gain_filter, - PreparedFilter *prepared_filter); + PreparedFilter &prepared_filter); void CloseFilter() noexcept; diff --git a/src/output/Thread.cxx b/src/output/Thread.cxx index f06a7430a..fe2e42512 100644 --- a/src/output/Thread.cxx +++ b/src/output/Thread.cxx @@ -148,7 +148,7 @@ AudioOutputControl::InternalOpen(const AudioFormat in_audio_format, f = source.Open(in_audio_format, pipe, output->prepared_replay_gain_filter, output->prepared_other_replay_gain_filter, - output->prepared_filter); + *output->prepared_filter); } catch (...) { std::throw_with_nested(FormatRuntimeError("Failed to open filter for %s", GetLogName()));