mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-17 19:16:14 +02:00
remove unused function
This commit is contained in:
parent
ba2e40909e
commit
cdc5dd2bac
3 changed files with 10 additions and 13 deletions
|
@ -98,20 +98,15 @@ PcmStreamPtr StreamManager::addStream(const std::string& uri)
|
|||
|
||||
void StreamManager::removeStream(const std::string& name)
|
||||
{
|
||||
if (streams_.empty())
|
||||
return;
|
||||
for (std::vector<PcmStreamPtr>::iterator iter = streams_.begin(); iter != streams_.end(); ++iter)
|
||||
auto iter = std::find_if(streams_.begin(), streams_.end(), [&name](const PcmStreamPtr& stream) { return stream->getName() == name; });
|
||||
if (iter != streams_.end())
|
||||
{
|
||||
auto s = *iter;
|
||||
if (s->getName() == name)
|
||||
{
|
||||
s->stop();
|
||||
streams_.erase(iter);
|
||||
break;
|
||||
}
|
||||
(*iter)->stop();
|
||||
streams_.erase(iter);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const std::vector<PcmStreamPtr>& StreamManager::getStreams()
|
||||
{
|
||||
return streams_;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue