Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/codecs/

BUG=webrtc:5520

Review URL: https://codereview.webrtc.org/1696853004

Cr-Commit-Position: refs/heads/master@{#11613}
This commit is contained in:
kwiberg
2016-02-14 01:10:03 -08:00
committed by Commit bot
parent 3f5f5aa449
commit 91d9756bc6
16 changed files with 41 additions and 35 deletions

View File

@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/checks.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/common_types.h"
#include "webrtc/modules/audio_coding/codecs/opus/audio_encoder_opus.h"
@ -31,7 +32,7 @@ class AudioEncoderOpusTest : public ::testing::Test {
}
CodecInst codec_inst_ = kOpusSettings;
rtc::scoped_ptr<AudioEncoderOpus> encoder_;
std::unique_ptr<AudioEncoderOpus> encoder_;
};
TEST_F(AudioEncoderOpusTest, DefaultApplicationModeMono) {

View File

@ -8,9 +8,10 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include <memory>
#include "testing/gtest/include/gtest/gtest.h"
#include "webrtc/base/format_macros.h"
#include "webrtc/base/scoped_ptr.h"
#include "webrtc/modules/audio_coding/codecs/opus/opus_interface.h"
#include "webrtc/test/testsupport/fileutils.h"
@ -61,9 +62,9 @@ class OpusFecTest : public TestWithParam<coding_param> {
string in_filename_;
rtc::scoped_ptr<int16_t[]> in_data_;
rtc::scoped_ptr<int16_t[]> out_data_;
rtc::scoped_ptr<uint8_t[]> bit_stream_;
std::unique_ptr<int16_t[]> in_data_;
std::unique_ptr<int16_t[]> out_data_;
std::unique_ptr<uint8_t[]> bit_stream_;
};
void OpusFecTest::SetUp() {

View File

@ -7,6 +7,8 @@
* 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 <string>
#include "testing/gtest/include/gtest/gtest.h"
@ -636,7 +638,7 @@ TEST_P(OpusTest, OpusDecodeRepacketized) {
// Encode & decode.
int16_t audio_type;
rtc::scoped_ptr<int16_t[]> output_data_decode(
std::unique_ptr<int16_t[]> output_data_decode(
new int16_t[kPackets * kOpus20msFrameSamples * channels_]);
OpusRepacketizer* rp = opus_repacketizer_create();