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:
@ -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;
|
||||
|
||||
Reference in New Issue
Block a user