From 82954d1d6fd18e0e9ef60c30999538385a1e6428 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 23 Jun 2018 18:44:48 +0200 Subject: [PATCH] player/Thread: eliminate ClearAndReplacePipe() Since commit e81b089612833b61c566b482640615e182949ac6, this is the same code as in ReplacePipe(). --- src/player/Thread.cxx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/player/Thread.cxx b/src/player/Thread.cxx index c19fe1504..0534305bc 100644 --- a/src/player/Thread.cxx +++ b/src/player/Thread.cxx @@ -169,12 +169,6 @@ private: xfade_state = CrossFadeState::UNKNOWN; } - void ClearAndReplacePipe(MusicPipe *_pipe) noexcept { - ResetCrossFade(); - delete pipe; - pipe = _pipe; - } - void ReplacePipe(MusicPipe *_pipe) noexcept { ResetCrossFade(); delete pipe; @@ -596,7 +590,7 @@ Player::SeekDecoder() noexcept if (!IsDecoderAtCurrentSong()) { /* the decoder is already decoding the "next" song, but it is the same song file; exchange the pipe */ - ClearAndReplacePipe(dc.pipe); + ReplacePipe(dc.pipe); } pc.next_song.reset();