gfe-relnote: (n/a) Change QUIC's AckedPacketVector and LostPacketVector from std::vector to QuicInlinedVector with a inline capacity of 2. Not protected.
PiperOrigin-RevId: 280667699
Change-Id: I0d765927d8403a737dc68d9240e8383e7b13fac8
diff --git a/quic/core/quic_sent_packet_manager.cc b/quic/core/quic_sent_packet_manager.cc
index 4ed206a..408cc2c 100644
--- a/quic/core/quic_sent_packet_manager.cc
+++ b/quic/core/quic_sent_packet_manager.cc
@@ -1185,7 +1185,7 @@
EncryptionLevel ack_decrypted_level) {
QuicByteCount prior_bytes_in_flight = unacked_packets_.bytes_in_flight();
// Reverse packets_acked_ so that it is in ascending order.
- reverse(packets_acked_.begin(), packets_acked_.end());
+ std::reverse(packets_acked_.begin(), packets_acked_.end());
for (AckedPacket& acked_packet : packets_acked_) {
QuicTransmissionInfo* info =
unacked_packets_.GetMutableTransmissionInfo(acked_packet.packet_number);
diff --git a/quic/core/quic_types.h b/quic/core/quic_types.h
index f4e6bdf..23cbe7a 100644
--- a/quic/core/quic_types.h
+++ b/quic/core/quic_types.h
@@ -15,6 +15,7 @@
#include "net/third_party/quiche/src/quic/core/quic_error_codes.h"
#include "net/third_party/quiche/src/quic/core/quic_packet_number.h"
#include "net/third_party/quiche/src/quic/core/quic_time.h"
+#include "net/third_party/quiche/src/quic/platform/api/quic_containers.h"
#include "net/third_party/quiche/src/quic/platform/api/quic_export.h"
namespace quic {
@@ -512,7 +513,7 @@
};
// A vector of acked packets.
-typedef std::vector<AckedPacket> AckedPacketVector;
+typedef QuicInlinedVector<AckedPacket, 2> AckedPacketVector;
// Information about a newly lost packet.
struct QUIC_EXPORT_PRIVATE LostPacket {
@@ -529,7 +530,7 @@
};
// A vector of lost packets.
-typedef std::vector<LostPacket> LostPacketVector;
+typedef QuicInlinedVector<LostPacket, 2> LostPacketVector;
enum QuicIetfTransportErrorCodes : uint64_t {
NO_IETF_QUIC_ERROR = 0x0,