player/Thread: eliminate ClearAndReplacePipe()

Since commit e81b089612, this is the
same code as in ReplacePipe().
This commit is contained in:
Max Kellermann 2018-06-23 18:44:48 +02:00
parent 5a02324c09
commit 82954d1d6f

View File

@ -169,12 +169,6 @@ private:
xfade_state = CrossFadeState::UNKNOWN; xfade_state = CrossFadeState::UNKNOWN;
} }
void ClearAndReplacePipe(MusicPipe *_pipe) noexcept {
ResetCrossFade();
delete pipe;
pipe = _pipe;
}
void ReplacePipe(MusicPipe *_pipe) noexcept { void ReplacePipe(MusicPipe *_pipe) noexcept {
ResetCrossFade(); ResetCrossFade();
delete pipe; delete pipe;
@ -596,7 +590,7 @@ Player::SeekDecoder() noexcept
if (!IsDecoderAtCurrentSong()) { if (!IsDecoderAtCurrentSong()) {
/* the decoder is already decoding the "next" song, /* the decoder is already decoding the "next" song,
but it is the same song file; exchange the pipe */ but it is the same song file; exchange the pipe */
ClearAndReplacePipe(dc.pipe); ReplacePipe(dc.pipe);
} }
pc.next_song.reset(); pc.next_song.reset();