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

Unified Diff: cc/base/list_container_helper.cc

Issue 1866203004: Convert //cc from scoped_ptr to std::unique_ptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scopedptrcc: rebase Created 4 years, 8 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 | « cc/base/list_container_helper.h ('k') | cc/base/math_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/list_container_helper.cc
diff --git a/cc/base/list_container_helper.cc b/cc/base/list_container_helper.cc
index 7b249ac01f7c8516101811a532ff197d36c2103d..9d8a0293a03db2ef98fd06724f02f88421a41ea3 100644
--- a/cc/base/list_container_helper.cc
+++ b/cc/base/list_container_helper.cc
@@ -29,7 +29,7 @@ class ListContainerHelper::CharAllocator {
// This class holds the raw memory chunk, as well as information about its
// size and availability.
struct InnerList {
- scoped_ptr<char[]> data;
+ std::unique_ptr<char[]> data;
// The number of elements in total the memory can hold. The difference
// between capacity and size is the how many more elements this list can
// hold.
@@ -66,7 +66,7 @@ class ListContainerHelper::CharAllocator {
capacity = size;
// Allocate the new data and update the iterator's pointer.
- scoped_ptr<char[]> new_data(new char[size * step]);
+ std::unique_ptr<char[]> new_data(new char[size * step]);
size_t position_offset = *position - Begin();
*position = new_data.get() + position_offset;
@@ -240,7 +240,7 @@ class ListContainerHelper::CharAllocator {
private:
void AllocateNewList(size_t list_size) {
- scoped_ptr<InnerList> new_list(new InnerList);
+ std::unique_ptr<InnerList> new_list(new InnerList);
new_list->capacity = list_size;
new_list->size = 0;
new_list->step = element_size_;
@@ -248,7 +248,7 @@ class ListContainerHelper::CharAllocator {
storage_.push_back(std::move(new_list));
}
- std::vector<scoped_ptr<InnerList>> storage_;
+ std::vector<std::unique_ptr<InnerList>> storage_;
const size_t element_size_;
// The number of elements in the list.
« no previous file with comments | « cc/base/list_container_helper.h ('k') | cc/base/math_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698