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

Unified Diff: webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h

Issue 1710483002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase 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/intelligibility/intelligibility_utils.h
diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
index 2bf0791d8544e7e0bf6786f10c9bf64186d0fdbb..8858cff74cba814609e45ecc0478d4023a9f2751 100644
--- a/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
+++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_utils.h
@@ -12,8 +12,7 @@
#define WEBRTC_MODULES_AUDIO_PROCESSING_INTELLIGIBILITY_INTELLIGIBILITY_UTILS_H_
#include <complex>
-
-#include "webrtc/base/scoped_ptr.h"
+#include <memory>
namespace webrtc {
@@ -36,13 +35,13 @@ class PowerEstimator {
private:
// TODO(ekmeyerson): Switch the following running means
- // and histories from rtc::scoped_ptr to std::vector.
- rtc::scoped_ptr<std::complex<float>[]> running_mean_sq_;
+ // and histories from std::unique_ptr to std::vector.
+ std::unique_ptr<std::complex<float>[]> running_mean_sq_;
// The current magnitude array.
- rtc::scoped_ptr<float[]> magnitude_;
+ std::unique_ptr<float[]> magnitude_;
// The current power array.
- rtc::scoped_ptr<float[]> power_;
+ std::unique_ptr<float[]> power_;
const size_t num_freqs_;
const float decay_;
@@ -66,8 +65,8 @@ class GainApplier {
private:
const size_t num_freqs_;
const float change_limit_;
- rtc::scoped_ptr<float[]> target_;
- rtc::scoped_ptr<float[]> current_;
+ std::unique_ptr<float[]> target_;
+ std::unique_ptr<float[]> current_;
};
} // namespace intelligibility

Powered by Google App Engine
This is Rietveld 408576698