Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(887)

Unified Diff: webrtc/modules/audio_processing/transient/click_annotate.cc

Issue 1698843003: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/transient/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: compile fix Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/audio_processing/transient/click_annotate.cc
diff --git a/webrtc/modules/audio_processing/transient/click_annotate.cc b/webrtc/modules/audio_processing/transient/click_annotate.cc
index 38f7a8eede74904b170c9e8489d9be02e89c1682..dd1c346ebd637db1c122567431335e756d67269c 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 @@ int main(int argc, char* argv[]) {
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 @@ int main(int argc, char* argv[]) {
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.

Powered by Google App Engine
This is Rietveld 408576698