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

Unified Diff: cc/base/scoped_ptr_vector.h

Issue 534743002: ScopedPtrVector change back const_iterator typedef (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | cc/base/scoped_ptr_vector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/base/scoped_ptr_vector.h
diff --git a/cc/base/scoped_ptr_vector.h b/cc/base/scoped_ptr_vector.h
index e046648b6916bb72025fbefbd080dc6bf8bf11a2..7f86ce3ebd943e3b6387b9108fc848c457d4ae55 100644
--- a/cc/base/scoped_ptr_vector.h
+++ b/cc/base/scoped_ptr_vector.h
@@ -20,7 +20,7 @@ namespace cc {
template <typename T>
class ScopedPtrVector {
public:
- typedef typename std::vector<const T*>::const_iterator const_iterator;
+ typedef typename std::vector<T*>::const_iterator const_iterator;
typedef typename std::vector<T*>::reverse_iterator reverse_iterator;
typedef typename std::vector<T*>::const_reverse_iterator
const_reverse_iterator;
@@ -129,13 +129,11 @@ class ScopedPtrVector {
data_.insert(position, item.release());
}
- void insert_and_take(iterator position,
- ScopedPtrVector<T>& other) {
+ void insert_and_take(iterator position, ScopedPtrVector<T>* other) {
std::vector<T*> tmp_data;
- for (ScopedPtrVector<T>::iterator it = other.begin();
- it != other.end();
+ for (ScopedPtrVector<T>::iterator it = other->begin(); it != other->end();
++it) {
- tmp_data.push_back(other.take(it).release());
+ tmp_data.push_back(other->take(it).release());
}
data_.insert(position, tmp_data.begin(), tmp_data.end());
}
« no previous file with comments | « no previous file | cc/base/scoped_ptr_vector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698