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/file_utils.cc b/webrtc/modules/audio_processing/transient/file_utils.cc
index e043286..ebe5306 100644
--- a/webrtc/modules/audio_processing/transient/file_utils.cc
+++ b/webrtc/modules/audio_processing/transient/file_utils.cc
@@ -10,7 +10,8 @@
#include "webrtc/modules/audio_processing/transient/file_utils.h"
-#include "webrtc/base/scoped_ptr.h"
+#include <memory>
+
#include "webrtc/system_wrappers/include/file_wrapper.h"
#include "webrtc/typedefs.h"
@@ -83,7 +84,7 @@
return 0;
}
- rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[2]);
+ std::unique_ptr<uint8_t[]> byte_array(new uint8_t[2]);
size_t int16s_read = 0;
@@ -109,7 +110,7 @@
return 0;
}
- rtc::scoped_ptr<int16_t[]> buffer16(new int16_t[length]);
+ std::unique_ptr<int16_t[]> buffer16(new int16_t[length]);
size_t int16s_read = ReadInt16BufferFromFile(file, length, buffer16.get());
@@ -127,7 +128,7 @@
return 0;
}
- rtc::scoped_ptr<int16_t[]> buffer16(new int16_t[length]);
+ std::unique_ptr<int16_t[]> buffer16(new int16_t[length]);
size_t int16s_read = ReadInt16BufferFromFile(file, length, buffer16.get());
@@ -145,7 +146,7 @@
return 0;
}
- rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[4]);
+ std::unique_ptr<uint8_t[]> byte_array(new uint8_t[4]);
size_t floats_read = 0;
@@ -168,7 +169,7 @@
return 0;
}
- rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[8]);
+ std::unique_ptr<uint8_t[]> byte_array(new uint8_t[8]);
size_t doubles_read = 0;
@@ -191,7 +192,7 @@
return 0;
}
- rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[2]);
+ std::unique_ptr<uint8_t[]> byte_array(new uint8_t[2]);
size_t int16s_written = 0;
@@ -215,7 +216,7 @@
return 0;
}
- rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[4]);
+ std::unique_ptr<uint8_t[]> byte_array(new uint8_t[4]);
size_t floats_written = 0;
@@ -238,7 +239,7 @@
return 0;
}
- rtc::scoped_ptr<uint8_t[]> byte_array(new uint8_t[8]);
+ std::unique_ptr<uint8_t[]> byte_array(new uint8_t[8]);
size_t doubles_written = 0;