Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/transient/
BUG=webrtc:5520
Review URL: https://codereview.webrtc.org/1698843003
Cr-Commit-Position: refs/heads/master@{#11645}
diff --git a/webrtc/modules/audio_processing/transient/click_annotate.cc b/webrtc/modules/audio_processing/transient/click_annotate.cc
index 38f7a8e..dd1c346 100644
--- a/webrtc/modules/audio_processing/transient/click_annotate.cc
+++ b/webrtc/modules/audio_processing/transient/click_annotate.cc
@@ -11,14 +11,13 @@
#include <cfloat>
#include <cstdio>
#include <cstdlib>
+#include <memory>
#include <vector>
#include "webrtc/modules/audio_processing/transient/transient_detector.h"
#include "webrtc/modules/audio_processing/transient/file_utils.h"
-#include "webrtc/base/scoped_ptr.h"
#include "webrtc/system_wrappers/include/file_wrapper.h"
-using rtc::scoped_ptr;
using webrtc::FileWrapper;
using webrtc::TransientDetector;
@@ -40,14 +39,14 @@
return 0;
}
- scoped_ptr<FileWrapper> pcm_file(FileWrapper::Create());
+ std::unique_ptr<FileWrapper> pcm_file(FileWrapper::Create());
pcm_file->OpenFile(argv[1], true, false, false);
if (!pcm_file->Open()) {
printf("\nThe %s could not be opened.\n\n", argv[1]);
return -1;
}
- scoped_ptr<FileWrapper> dat_file(FileWrapper::Create());
+ std::unique_ptr<FileWrapper> dat_file(FileWrapper::Create());
dat_file->OpenFile(argv[2], false, false, false);
if (!dat_file->Open()) {
printf("\nThe %s could not be opened.\n\n", argv[2]);
@@ -69,7 +68,7 @@
TransientDetector detector(sample_rate_hz);
int lost_packets = 0;
size_t audio_buffer_length = chunk_size_ms * sample_rate_hz / 1000;
- scoped_ptr<float[]> audio_buffer(new float[audio_buffer_length]);
+ std::unique_ptr<float[]> audio_buffer(new float[audio_buffer_length]);
std::vector<float> send_times;
// Read first buffer from the PCM test file.