Skip to content

Commit

Permalink
Use the interator to avoid another map lookup.
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveMcFarlin committed Jul 19, 2021
1 parent db9fa20 commit 3957d48
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions worker/src/RTC/ActiveSpeakerObserver.cpp
Expand Up @@ -143,9 +143,9 @@ namespace RTC
return;
}

if (this->mapProducerSpeaker[producer->id].speaker != nullptr)
if (it->second.speaker != nullptr)
{
delete this->mapProducerSpeaker[producer->id].speaker;
delete it->second.speaker;
}

this->mapProducerSpeaker.erase(producer->id);
Expand Down

0 comments on commit 3957d48

Please sign in to comment.