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

Unified Diff: webrtc/modules/audio_processing/test/protobuf_utils.cc

Issue 1694423002: Replace scoped_ptr with unique_ptr in webrtc/modules/audio_processing/test/ (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_processing/test/protobuf_utils.cc
diff --git a/webrtc/modules/audio_processing/test/protobuf_utils.cc b/webrtc/modules/audio_processing/test/protobuf_utils.cc
index 37042cdc141a5de8b99f2aff937b7966a6018397..c18a13e6edfe306688491efe17f834169484e9d3 100644
--- a/webrtc/modules/audio_processing/test/protobuf_utils.cc
+++ b/webrtc/modules/audio_processing/test/protobuf_utils.cc
@@ -9,10 +9,11 @@
*/
#include "webrtc/modules/audio_processing/test/protobuf_utils.h"
+#include "webrtc/typedefs.h"
namespace webrtc {
-size_t ReadMessageBytesFromFile(FILE* file, rtc::scoped_ptr<uint8_t[]>* bytes) {
+size_t ReadMessageBytesFromFile(FILE* file, std::unique_ptr<uint8_t[]>* bytes) {
// The "wire format" for the size is little-endian. Assume we're running on
// a little-endian machine.
#ifndef WEBRTC_ARCH_LITTLE_ENDIAN
@@ -30,7 +31,7 @@ size_t ReadMessageBytesFromFile(FILE* file, rtc::scoped_ptr<uint8_t[]>* bytes) {
// Returns true on success, false on error or end-of-file.
bool ReadMessageFromFile(FILE* file, ::google::protobuf::MessageLite* msg) {
- rtc::scoped_ptr<uint8_t[]> bytes;
+ std::unique_ptr<uint8_t[]> bytes;
size_t size = ReadMessageBytesFromFile(file, &bytes);
if (!size)
return false;
« no previous file with comments | « webrtc/modules/audio_processing/test/protobuf_utils.h ('k') | webrtc/modules/audio_processing/test/test_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698