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

Unified Diff: webrtc/test/fuzzers/producer_fec_fuzzer.cc

Issue 1937693002: Replace scoped_ptr with unique_ptr everywhere (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@unique5
Patch Set: Created 4 years, 8 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
« no previous file with comments | « webrtc/test/frame_generator_unittest.cc ('k') | webrtc/test/fuzzers/rtcp_receiver_fuzzer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/fuzzers/producer_fec_fuzzer.cc
diff --git a/webrtc/test/fuzzers/producer_fec_fuzzer.cc b/webrtc/test/fuzzers/producer_fec_fuzzer.cc
index abde8795376e2c909091ecaf5cb5c9dd02dee93b..53f749386996e9397ad88b3062b243ad92e8f2ad 100644
--- a/webrtc/test/fuzzers/producer_fec_fuzzer.cc
+++ b/webrtc/test/fuzzers/producer_fec_fuzzer.cc
@@ -7,8 +7,10 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
+
+#include <memory>
+
#include "webrtc/base/checks.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/source/byte_io.h"
#include "webrtc/modules/rtp_rtcp/source/producer_fec.h"
@@ -30,14 +32,14 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
size_t payload_size = data[i++] % 10;
if (i + payload_size + rtp_header_length + 2 > size)
break;
- rtc::scoped_ptr<uint8_t[]> packet(
+ std::unique_ptr<uint8_t[]> packet(
new uint8_t[payload_size + rtp_header_length]);
memcpy(packet.get(), &data[i], payload_size + rtp_header_length);
ByteWriter<uint16_t>::WriteBigEndian(&packet[2], seq_num++);
i += payload_size + rtp_header_length;
// Make sure sequence numbers are increasing.
const int kRedPayloadType = 98;
- rtc::scoped_ptr<RedPacket> red_packet(producer.BuildRedPacket(
+ std::unique_ptr<RedPacket> red_packet(producer.BuildRedPacket(
packet.get(), payload_size, rtp_header_length, kRedPayloadType));
const bool protect = data[i++] % 2 == 1;
if (protect) {
« no previous file with comments | « webrtc/test/frame_generator_unittest.cc ('k') | webrtc/test/fuzzers/rtcp_receiver_fuzzer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698