Replace scoped_ptr with unique_ptr everywhere
But keep #including scoped_ptr.h in .h files, so as not to break WebRTC users who expect those .h files to give them rtc::scoped_ptr. BUG=webrtc:5520 Review-Url: https://codereview.webrtc.org/1937693002 Cr-Commit-Position: refs/heads/master@{#12581}
This commit is contained in:
@ -10,8 +10,9 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/test/rtp_file_reader.h"
|
||||
#include "webrtc/test/rtp_file_writer.h"
|
||||
#include "webrtc/test/testsupport/fileutils.h"
|
||||
@ -43,7 +44,7 @@ class RtpFileWriterTest : public ::testing::Test {
|
||||
void VerifyFileContents(int expected_packets) {
|
||||
ASSERT_TRUE(rtp_writer_.get() == NULL)
|
||||
<< "Must call CloseOutputFile before VerifyFileContents";
|
||||
rtc::scoped_ptr<test::RtpFileReader> rtp_reader(
|
||||
std::unique_ptr<test::RtpFileReader> rtp_reader(
|
||||
test::RtpFileReader::Create(test::RtpFileReader::kRtpDump, filename_));
|
||||
ASSERT_TRUE(rtp_reader.get() != NULL);
|
||||
test::RtpPacket packet;
|
||||
@ -61,7 +62,7 @@ class RtpFileWriterTest : public ::testing::Test {
|
||||
}
|
||||
|
||||
private:
|
||||
rtc::scoped_ptr<test::RtpFileWriter> rtp_writer_;
|
||||
std::unique_ptr<test::RtpFileWriter> rtp_writer_;
|
||||
std::string filename_;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user