Index: webrtc/common_audio/ring_buffer_unittest.cc |
diff --git a/webrtc/common_audio/ring_buffer_unittest.cc b/webrtc/common_audio/ring_buffer_unittest.cc |
index f8cce74d9cd0fdc60a878ad04abd78dc49f18f79..92c470a02d707ba27f14e57c489b4e0596243e60 100644 |
--- a/webrtc/common_audio/ring_buffer_unittest.cc |
+++ b/webrtc/common_audio/ring_buffer_unittest.cc |
@@ -12,10 +12,11 @@ |
#include <stdlib.h> |
#include <time.h> |
+ |
#include <algorithm> |
+#include <memory> |
#include "testing/gtest/include/gtest/gtest.h" |
-#include "webrtc/base/scoped_ptr.h" |
namespace webrtc { |
@@ -24,7 +25,7 @@ struct FreeBufferDeleter { |
WebRtc_FreeBuffer(ptr); |
} |
}; |
-typedef rtc::scoped_ptr<RingBuffer, FreeBufferDeleter> scoped_ring_buffer; |
+typedef std::unique_ptr<RingBuffer, FreeBufferDeleter> scoped_ring_buffer; |
static void AssertElementEq(int expected, int actual) { |
ASSERT_EQ(expected, actual); |
@@ -58,8 +59,8 @@ static void RandomStressTest(int** data_ptr) { |
srand(seed); |
for (int i = 0; i < kNumTests; i++) { |
const int buffer_size = std::max(rand() % kMaxBufferSize, 1); |
- rtc::scoped_ptr<int[]> write_data(new int[buffer_size]); |
- rtc::scoped_ptr<int[]> read_data(new int[buffer_size]); |
+ std::unique_ptr<int[]> write_data(new int[buffer_size]); |
+ std::unique_ptr<int[]> read_data(new int[buffer_size]); |
scoped_ring_buffer buffer(WebRtc_CreateBuffer(buffer_size, sizeof(int))); |
ASSERT_TRUE(buffer.get() != NULL); |
WebRtc_InitBuffer(buffer.get()); |