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

Unified Diff: webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc

Issue 1921233002: Replace the remaining scoped_ptr with unique_ptr in webrtc/modules/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
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
Index: webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
diff --git a/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc b/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
index 466214c740e229d17a8a50d57803c463d47d8033..b7c4ef5506b1a11f67e573cfae7d8cacd3edec9a 100644
--- a/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
+++ b/webrtc/modules/rtp_rtcp/test/testFec/test_packet_masks_metrics.cc
@@ -45,8 +45,9 @@
#include <math.h>
+#include <memory>
+
#include "testing/gtest/include/gtest/gtest.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/rtp_rtcp/source/forward_error_correction_internal.h"
#include "webrtc/modules/rtp_rtcp/test/testFec/average_residual_loss_xor_codes.h"
#include "webrtc/test/testsupport/fileutils.h"
@@ -191,7 +192,7 @@ class FecPacketMaskMetricsTest : public ::testing::Test {
int RecoveredMediaPackets(int num_media_packets,
int num_fec_packets,
uint8_t* state) {
- rtc::scoped_ptr<uint8_t[]> state_tmp(
+ std::unique_ptr<uint8_t[]> state_tmp(
new uint8_t[num_media_packets + num_fec_packets]);
memcpy(state_tmp.get(), state, num_media_packets + num_fec_packets);
int num_recovered_packets = 0;
@@ -385,7 +386,7 @@ class FecPacketMaskMetricsTest : public ::testing::Test {
// (which containes the code size parameters/protection length).
void ComputeMetricsForCode(CodeType code_type,
int code_index) {
- rtc::scoped_ptr<double[]> prob_weight(new double[kNumLossModels]);
+ std::unique_ptr<double[]> prob_weight(new double[kNumLossModels]);
memset(prob_weight.get() , 0, sizeof(double) * kNumLossModels);
MetricsFecCode metrics_code;
SetMetricsZero(&metrics_code);
@@ -393,7 +394,7 @@ class FecPacketMaskMetricsTest : public ::testing::Test {
int num_media_packets = code_params_[code_index].num_media_packets;
int num_fec_packets = code_params_[code_index].num_fec_packets;
int tot_num_packets = num_media_packets + num_fec_packets;
- rtc::scoped_ptr<uint8_t[]> state(new uint8_t[tot_num_packets]);
+ std::unique_ptr<uint8_t[]> state(new uint8_t[tot_num_packets]);
memset(state.get() , 0, tot_num_packets);
int num_loss_configurations = static_cast<int>(pow(2.0f, tot_num_packets));
« no previous file with comments | « webrtc/modules/rtp_rtcp/test/testAPI/test_api_video.cc ('k') | webrtc/modules/utility/include/jvm_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698