Fixing incorrect use of erase/remove idiom.
In this case it wasn't an issue, because only one result would be found by remove_if, but might as well fix it just in case. BUG=None TBR=pthatcher@webrtc.org Review-Url: https://codereview.webrtc.org/2945723002 Cr-Commit-Position: refs/heads/master@{#18641}
This commit is contained in:
parent
dab1d2d34e
commit
19b3a554e8
@ -435,11 +435,13 @@ void StatsCollector::AddLocalAudioTrack(AudioTrackInterface* audio_track,
|
||||
void StatsCollector::RemoveLocalAudioTrack(AudioTrackInterface* audio_track,
|
||||
uint32_t ssrc) {
|
||||
RTC_DCHECK(audio_track != NULL);
|
||||
local_audio_tracks_.erase(std::remove_if(local_audio_tracks_.begin(),
|
||||
local_audio_tracks_.end(),
|
||||
[audio_track, ssrc](const LocalAudioTrackVector::value_type& track) {
|
||||
return track.first == audio_track && track.second == ssrc;
|
||||
}));
|
||||
local_audio_tracks_.erase(
|
||||
std::remove_if(
|
||||
local_audio_tracks_.begin(), local_audio_tracks_.end(),
|
||||
[audio_track, ssrc](const LocalAudioTrackVector::value_type& track) {
|
||||
return track.first == audio_track && track.second == ssrc;
|
||||
}),
|
||||
local_audio_tracks_.end());
|
||||
}
|
||||
|
||||
void StatsCollector::GetStats(MediaStreamTrackInterface* track,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user