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

Unified Diff: webrtc/base/buffer.h

Issue 1687833006: rtc::Buffer: Replace an internal rtc::scoped_ptr with std::unique_ptr (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
« no previous file with comments | « webrtc/api/objc/RTCDataChannel.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/buffer.h
diff --git a/webrtc/base/buffer.h b/webrtc/base/buffer.h
index ff9bb73d3f998ad3f7cd76fcae320cf521958293..5c9380afee03a5e0825d92475e9ed578244314ae 100644
--- a/webrtc/base/buffer.h
+++ b/webrtc/base/buffer.h
@@ -14,10 +14,11 @@
#include <algorithm> // std::swap (pre-C++11)
#include <cassert>
#include <cstring>
+#include <memory>
#include <utility> // std::swap (C++11 and later)
+#include "webrtc/base/constructormagic.h"
#include "webrtc/base/deprecation.h"
-#include "webrtc/base/scoped_ptr.h"
namespace rtc {
@@ -164,7 +165,7 @@ class Buffer {
assert(IsConsistent());
if (capacity <= capacity_)
return;
- scoped_ptr<uint8_t[]> new_data(new uint8_t[capacity]);
+ std::unique_ptr<uint8_t[]> new_data(new uint8_t[capacity]);
std::memcpy(new_data.get(), data_.get(), size_);
data_ = std::move(new_data);
capacity_ = capacity;
@@ -222,7 +223,7 @@ class Buffer {
size_t size_;
size_t capacity_;
- scoped_ptr<uint8_t[]> data_;
+ std::unique_ptr<uint8_t[]> data_;
};
} // namespace rtc
« no previous file with comments | « webrtc/api/objc/RTCDataChannel.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698