mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-12 08:36:43 +02:00
Fix warning
This commit is contained in:
parent
f07453bd60
commit
7abec2eaf6
2 changed files with 3 additions and 3 deletions
|
@ -42,7 +42,7 @@ MetaStream::MetaStream(PcmListener* pcmListener, std::vector<std::shared_ptr<Pcm
|
|||
continue;
|
||||
|
||||
bool found = false;
|
||||
for (const auto stream : streams)
|
||||
for (const auto& stream : streams)
|
||||
{
|
||||
if (stream->getName() == component)
|
||||
{
|
||||
|
@ -96,7 +96,7 @@ void MetaStream::onStateChanged(const PcmStream* pcmStream, ReaderState state)
|
|||
{
|
||||
LOG(DEBUG, LOG_TAG) << "onStateChanged: " << pcmStream->getName() << ", state: " << static_cast<int>(state) << "\n";
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
for (const auto stream : streams_)
|
||||
for (const auto& stream : streams_)
|
||||
{
|
||||
if (stream->getState() == ReaderState::kPlaying)
|
||||
{
|
||||
|
|
|
@ -153,7 +153,7 @@ const PcmStreamPtr StreamManager::getDefaultStream()
|
|||
if (streams_.empty())
|
||||
return nullptr;
|
||||
|
||||
for (const auto stream : streams_)
|
||||
for (const auto& stream : streams_)
|
||||
{
|
||||
if (stream->getCodec() != "null")
|
||||
return stream;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue