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

Unified Diff: webrtc/common_audio/ring_buffer_unittest.cc

Issue 1712513002: Replace scoped_ptr with unique_ptr in webrtc/common_audio/ (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/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());
« no previous file with comments | « webrtc/common_audio/resampler/sinc_resampler_unittest.cc ('k') | webrtc/common_audio/sparse_fir_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698