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

Unified Diff: src/list.h

Issue 12427: Merge regexp2000 back into bleeding_edge (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years, 1 month 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: src/list.h
===================================================================
--- src/list.h (revision 830)
+++ src/list.h (working copy)
@@ -46,6 +46,7 @@
template <typename T, class P>
class List {
public:
+
INLINE(explicit List(int capacity)) { Initialize(capacity); }
INLINE(~List()) { DeleteData(data_); }
@@ -67,6 +68,8 @@
Vector<T> ToVector() { return Vector<T>(data_, length_); }
+ Vector<const T> ToConstVector() { return Vector<const T>(data_, length_); }
+
// Adds a copy of the given 'element' to the end of the list,
// expanding the list if necessary.
T& Add(const T& element);
@@ -92,11 +95,14 @@
// Drops all but the first 'pos' elements from the list.
INLINE(void Rewind(int pos));
+ bool Contains(const T& elm);
+
// Iterate through all list entries, starting at index 0.
void Iterate(void (*callback)(T* x));
// Sort all list entries (using QuickSort)
void Sort(int (*cmp)(const T* x, const T* y));
+ void Sort();
INLINE(void Initialize(int capacity));

Powered by Google App Engine
This is Rietveld 408576698