Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc

Issue 2080553003: Style updates for ForwardErrorCorrection and related classes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Re-add <iterator> in forward_error_correction.cc. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
diff --git a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
index 83bd2849df4304d26c27335360830ec8856f0193..c83c02091be462f0d5486c75f04e20e46272cd15 100644
--- a/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
+++ b/webrtc/modules/rtp_rtcp/source/fec_receiver_impl.cc
@@ -10,10 +10,9 @@
#include "webrtc/modules/rtp_rtcp/source/fec_receiver_impl.h"
-#include <assert.h>
-
#include <memory>
+#include "webrtc/base/checks.h"
#include "webrtc/base/logging.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_receiver_video.h"
@@ -235,15 +234,15 @@ int32_t FecReceiverImpl::ProcessReceivedFec() {
crit_sect_.Leave();
return -1;
}
- assert(received_packet_list_.empty());
+ RTC_DCHECK(received_packet_list_.empty());
}
// Send any recovered media packets to VCM.
- ForwardErrorCorrection::RecoveredPacketList::iterator it =
- recovered_packet_list_.begin();
- for (; it != recovered_packet_list_.end(); ++it) {
- if ((*it)->returned) // Already sent to the VCM and the jitter buffer.
+ for(auto* recovered_packet : recovered_packet_list_) {
+ if (recovered_packet->returned) {
+ // Already sent to the VCM and the jitter buffer.
continue;
- ForwardErrorCorrection::Packet* packet = (*it)->pkt;
+ }
+ ForwardErrorCorrection::Packet* packet = recovered_packet->pkt;
++packet_counter_.num_recovered_packets;
crit_sect_.Leave();
if (!recovered_packet_callback_->OnRecoveredPacket(packet->data,
@@ -251,7 +250,7 @@ int32_t FecReceiverImpl::ProcessReceivedFec() {
return -1;
}
crit_sect_.Enter();
- (*it)->returned = true;
+ recovered_packet->returned = true;
}
crit_sect_.Leave();
return 0;

Powered by Google App Engine
This is Rietveld 408576698