2023-03-06 14:42:04 +01:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
// Copyright The Music Player Daemon Project
|
2013-01-29 18:56:35 +01:00
|
|
|
|
2013-09-05 09:37:54 +02:00
|
|
|
#include "MemorySongEnumerator.hxx"
|
|
|
|
|
2016-02-07 08:23:30 +01:00
|
|
|
std::unique_ptr<DetachedSong>
|
2013-09-05 09:37:54 +02:00
|
|
|
MemorySongEnumerator::NextSong()
|
|
|
|
{
|
|
|
|
if (songs.empty())
|
|
|
|
return nullptr;
|
|
|
|
|
2017-11-26 12:10:33 +01:00
|
|
|
auto result = std::make_unique<DetachedSong>(std::move(songs.front()));
|
2013-09-05 09:37:54 +02:00
|
|
|
songs.pop_front();
|
|
|
|
return result;
|
|
|
|
}
|