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

Unified Diff: webrtc/modules/video_processing/test/video_processing_unittest.cc

Issue 1738863002: Replace scoped_ptr with unique_ptr in webrtc/modules/video_*/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@up4
Patch Set: rebase Created 4 years, 10 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/video_processing/test/video_processing_unittest.cc
diff --git a/webrtc/modules/video_processing/test/video_processing_unittest.cc b/webrtc/modules/video_processing/test/video_processing_unittest.cc
index b9a22d885bbbcc53007b5dc25d1c990ac30799da..0d18d0a4c891a47381e359994818dd3bb9330efb 100644
--- a/webrtc/modules/video_processing/test/video_processing_unittest.cc
+++ b/webrtc/modules/video_processing/test/video_processing_unittest.cc
@@ -12,6 +12,7 @@
#include <gflags/gflags.h>
+#include <memory>
#include <string>
#include "webrtc/common_video/libyuv/include/webrtc_libyuv.h"
@@ -116,7 +117,7 @@ TEST_F(VideoProcessingTest, HandleBadStats) {
#endif
VideoProcessing::FrameStats stats;
vp_->ClearFrameStats(&stats);
- rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+ std::unique_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
ASSERT_EQ(frame_length_,
fread(video_buffer.get(), 1, frame_length_, source_file_));
EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_,
@@ -135,7 +136,7 @@ TEST_F(VideoProcessingTest, IdenticalResultsAfterReset) {
VideoFrame video_frame2;
VideoProcessing::FrameStats stats;
// Only testing non-static functions here.
- rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+ std::unique_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
ASSERT_EQ(frame_length_,
fread(video_buffer.get(), 1, frame_length_, source_file_));
EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_,
@@ -171,7 +172,7 @@ TEST_F(VideoProcessingTest, FrameStats) {
#endif
VideoProcessing::FrameStats stats;
vp_->ClearFrameStats(&stats);
- rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+ std::unique_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
ASSERT_EQ(frame_length_,
fread(video_buffer.get(), 1, frame_length_, source_file_));
EXPECT_EQ(0, ConvertToI420(kI420, video_buffer.get(), 0, 0, width_, height_,
@@ -235,7 +236,7 @@ TEST_F(VideoProcessingTest, Resampler) {
vp_->EnableTemporalDecimation(false);
// Reading test frame
- rtc::scoped_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
+ std::unique_ptr<uint8_t[]> video_buffer(new uint8_t[frame_length_]);
ASSERT_EQ(frame_length_,
fread(video_buffer.get(), 1, frame_length_, source_file_));
// Using ConvertToI420 to add stride to the image.
« no previous file with comments | « webrtc/modules/video_processing/test/denoiser_test.cc ('k') | webrtc/modules/video_processing/util/denoiser_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698