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/qbone/bonnet/tun_device_packet_exchanger.cc b/quic/qbone/bonnet/tun_device_packet_exchanger.cc
index 1d246a2..94aeba1 100644
--- a/quic/qbone/bonnet/tun_device_packet_exchanger.cc
+++ b/quic/qbone/bonnet/tun_device_packet_exchanger.cc
@@ -14,7 +14,8 @@
size_t mtu,
KernelInterface* kernel,
QbonePacketExchanger::Visitor* visitor,
- size_t max_pending_packets, StatsInterface* stats)
+ size_t max_pending_packets,
+ StatsInterface* stats)
: QbonePacketExchanger(visitor, max_pending_packets),
fd_(fd),
mtu_(mtu),
@@ -59,7 +60,7 @@
}
// Reading on a TUN device returns a packet at a time. If the packet is longer
// than the buffer, it's truncated.
- auto read_buffer = QuicMakeUnique<char[]>(mtu_);
+ auto read_buffer = std::make_unique<char[]>(mtu_);
int result = kernel_->read(fd_, read_buffer.get(), mtu_);
// Note that 0 means end of file, but we're talking about a TUN device - there
// is no end of file. Therefore 0 also indicates error.
@@ -72,7 +73,7 @@
return nullptr;
}
stats_->OnPacketRead();
- return QuicMakeUnique<QuicData>(read_buffer.release(), result, true);
+ return std::make_unique<QuicData>(read_buffer.release(), result, true);
}
int TunDevicePacketExchanger::file_descriptor() const {