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

BUG=webrtc:5520

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

Cr-Commit-Position: refs/heads/master@{#11616}
This commit is contained in:
kwiberg
2016-02-14 09:28:33 -08:00
committed by Commit bot
parent 04af839a88
commit 2d0c33277c
35 changed files with 158 additions and 149 deletions

View File

@ -13,6 +13,7 @@
#include <assert.h>
#include <algorithm>
#include <memory>
#include "webrtc/typedefs.h"
@ -180,7 +181,7 @@ int16_t& AudioVector::operator[](size_t index) {
void AudioVector::Reserve(size_t n) {
if (capacity_ < n) {
rtc::scoped_ptr<int16_t[]> temp_array(new int16_t[n]);
std::unique_ptr<int16_t[]> temp_array(new int16_t[n]);
memcpy(temp_array.get(), array_.get(), Size() * sizeof(int16_t));
array_.swap(temp_array);
capacity_ = n;