mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-13 09:06: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;
|
continue;
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
for (const auto stream : streams)
|
for (const auto& stream : streams)
|
||||||
{
|
{
|
||||||
if (stream->getName() == component)
|
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";
|
LOG(DEBUG, LOG_TAG) << "onStateChanged: " << pcmStream->getName() << ", state: " << static_cast<int>(state) << "\n";
|
||||||
std::lock_guard<std::mutex> lock(mutex_);
|
std::lock_guard<std::mutex> lock(mutex_);
|
||||||
for (const auto stream : streams_)
|
for (const auto& stream : streams_)
|
||||||
{
|
{
|
||||||
if (stream->getState() == ReaderState::kPlaying)
|
if (stream->getState() == ReaderState::kPlaying)
|
||||||
{
|
{
|
||||||
|
|
|
@ -153,7 +153,7 @@ const PcmStreamPtr StreamManager::getDefaultStream()
|
||||||
if (streams_.empty())
|
if (streams_.empty())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
for (const auto stream : streams_)
|
for (const auto& stream : streams_)
|
||||||
{
|
{
|
||||||
if (stream->getCodec() != "null")
|
if (stream->getCodec() != "null")
|
||||||
return stream;
|
return stream;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue