Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/test/
BUG=webrtc:5520 Review URL: https://codereview.webrtc.org/1694423002 Cr-Commit-Position: refs/heads/master@{#11653}
This commit is contained in:
@ -9,12 +9,13 @@
|
||||
*/
|
||||
|
||||
#include <stddef.h> // size_t
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "webrtc/base/checks.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/common_audio/channel_buffer.h"
|
||||
#include "webrtc/modules/audio_coding/neteq/tools/resample_input_audio_file.h"
|
||||
#include "webrtc/modules/audio_processing/debug.pb.h"
|
||||
@ -28,7 +29,7 @@ namespace test {
|
||||
|
||||
namespace {
|
||||
|
||||
void MaybeResetBuffer(rtc::scoped_ptr<ChannelBuffer<float>>* buffer,
|
||||
void MaybeResetBuffer(std::unique_ptr<ChannelBuffer<float>>* buffer,
|
||||
const StreamConfig& config) {
|
||||
auto& buffer_ref = *buffer;
|
||||
if (!buffer_ref.get() || buffer_ref->num_frames() != config.num_frames() ||
|
||||
@ -101,11 +102,11 @@ class DebugDumpGenerator {
|
||||
const int reverse_file_channels_;
|
||||
|
||||
// Buffer for APM input/output.
|
||||
rtc::scoped_ptr<ChannelBuffer<float>> input_;
|
||||
rtc::scoped_ptr<ChannelBuffer<float>> reverse_;
|
||||
rtc::scoped_ptr<ChannelBuffer<float>> output_;
|
||||
std::unique_ptr<ChannelBuffer<float>> input_;
|
||||
std::unique_ptr<ChannelBuffer<float>> reverse_;
|
||||
std::unique_ptr<ChannelBuffer<float>> output_;
|
||||
|
||||
rtc::scoped_ptr<AudioProcessing> apm_;
|
||||
std::unique_ptr<AudioProcessing> apm_;
|
||||
|
||||
const std::string dump_file_name_;
|
||||
};
|
||||
@ -250,11 +251,11 @@ class DebugDumpTest : public ::testing::Test {
|
||||
void ConfigureApm(const audioproc::Config& msg);
|
||||
|
||||
// Buffer for APM input/output.
|
||||
rtc::scoped_ptr<ChannelBuffer<float>> input_;
|
||||
rtc::scoped_ptr<ChannelBuffer<float>> reverse_;
|
||||
rtc::scoped_ptr<ChannelBuffer<float>> output_;
|
||||
std::unique_ptr<ChannelBuffer<float>> input_;
|
||||
std::unique_ptr<ChannelBuffer<float>> reverse_;
|
||||
std::unique_ptr<ChannelBuffer<float>> output_;
|
||||
|
||||
rtc::scoped_ptr<AudioProcessing> apm_;
|
||||
std::unique_ptr<AudioProcessing> apm_;
|
||||
|
||||
StreamConfig input_config_;
|
||||
StreamConfig reverse_config_;
|
||||
|
||||
Reference in New Issue
Block a user