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

Unified Diff: webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h

Issue 1696853004: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_coding/codecs/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: 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_coding/codecs/cng/audio_encoder_cng.h
diff --git a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
index 87383e2ac59fef5044a1365bf6e29b52fd53a79c..8a17ac9822c189b7a1a3b08dc50d1f53be87b624 100644
--- a/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
+++ b/webrtc/modules/audio_coding/codecs/cng/audio_encoder_cng.h
@@ -11,16 +11,17 @@
#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_AUDIO_ENCODER_CNG_H_
#define WEBRTC_MODULES_AUDIO_CODING_CODECS_CNG_AUDIO_ENCODER_CNG_H_
+#include <memory>
#include <vector>
-#include "webrtc/base/scoped_ptr.h"
+#include "webrtc/base/constructormagic.h"
#include "webrtc/common_audio/vad/include/vad.h"
#include "webrtc/modules/audio_coding/codecs/audio_encoder.h"
#include "webrtc/modules/audio_coding/codecs/cng/webrtc_cng.h"
namespace webrtc {
-// Deleter for use with scoped_ptr.
+// Deleter for use with unique_ptr.
struct CngInstDeleter {
void operator()(CNG_enc_inst* ptr) const { WebRtcCng_FreeEnc(ptr); }
};
@@ -84,8 +85,8 @@ class AudioEncoderCng final : public AudioEncoder {
std::vector<int16_t> speech_buffer_;
std::vector<uint32_t> rtp_timestamps_;
bool last_frame_active_;
- rtc::scoped_ptr<Vad> vad_;
- rtc::scoped_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
+ std::unique_ptr<Vad> vad_;
+ std::unique_ptr<CNG_enc_inst, CngInstDeleter> cng_inst_;
RTC_DISALLOW_COPY_AND_ASSIGN(AudioEncoderCng);
};

Powered by Google App Engine
This is Rietveld 408576698