Index: net/quic/quic_sent_packet_manager.cc |
diff --git a/net/quic/quic_sent_packet_manager.cc b/net/quic/quic_sent_packet_manager.cc |
index 9c502f4d3e318e37f97394951e0918143d2c44d7..242d8e748ec3000eccb68939c2358df1ed36a46d 100644 |
--- a/net/quic/quic_sent_packet_manager.cc |
+++ b/net/quic/quic_sent_packet_manager.cc |
@@ -435,16 +435,14 @@ QuicSentPacketManager::PendingRetransmission |
TransmissionType transmission_type = pending_retransmissions_.begin()->second; |
if (unacked_packets_.HasPendingCryptoPackets()) { |
// Ensure crypto packets are retransmitted before other packets. |
- PendingRetransmissionMap::const_iterator it = |
- pending_retransmissions_.begin(); |
- do { |
- if (HasCryptoHandshake(unacked_packets_.GetTransmissionInfo(it->first))) { |
- sequence_number = it->first; |
- transmission_type = it->second; |
+ for (const auto& pair : pending_retransmissions_) { |
+ if (HasCryptoHandshake( |
+ unacked_packets_.GetTransmissionInfo(pair.first))) { |
+ sequence_number = pair.first; |
+ transmission_type = pair.second; |
break; |
} |
- ++it; |
- } while (it != pending_retransmissions_.end()); |
+ } |
} |
DCHECK(unacked_packets_.IsUnacked(sequence_number)) << sequence_number; |
const TransmissionInfo& transmission_info = |