Switch QuicMakeUnique to std::make_unique, part 1: //third_party/quic
gfe-relnote: n/a (no functional change)
PiperOrigin-RevId: 267662077
Change-Id: Ic63023042eafb77aa80d88749845f841b3078c57
diff --git a/quic/core/quic_packets.cc b/quic/core/quic_packets.cc
index 2d6d0c9..c4ef81a 100644
--- a/quic/core/quic_packets.cc
+++ b/quic/core/quic_packets.cc
@@ -339,7 +339,7 @@
std::unique_ptr<QuicEncryptedPacket> QuicEncryptedPacket::Clone() const {
char* buffer = new char[this->length()];
memcpy(buffer, this->data(), this->length());
- return QuicMakeUnique<QuicEncryptedPacket>(buffer, this->length(), true);
+ return std::make_unique<QuicEncryptedPacket>(buffer, this->length(), true);
}
std::ostream& operator<<(std::ostream& os, const QuicEncryptedPacket& s) {
@@ -410,12 +410,12 @@
if (this->packet_headers()) {
char* headers_buffer = new char[this->headers_length()];
memcpy(headers_buffer, this->packet_headers(), this->headers_length());
- return QuicMakeUnique<QuicReceivedPacket>(
+ return std::make_unique<QuicReceivedPacket>(
buffer, this->length(), receipt_time(), true, ttl(), ttl() >= 0,
headers_buffer, this->headers_length(), true);
}
- return QuicMakeUnique<QuicReceivedPacket>(
+ return std::make_unique<QuicReceivedPacket>(
buffer, this->length(), receipt_time(), true, ttl(), ttl() >= 0);
}