Commit 82954d1d authored by Max Kellermann's avatar Max Kellermann

player/Thread: eliminate ClearAndReplacePipe()

Since commit e81b0896, this is the same code as in ReplacePipe().
parent 5a02324c
......@@ -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();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment