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

Unified Diff: src/list.h

Issue 40105: Add an insert function to our list utility class. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 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 | « no previous file | src/list-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/list.h
===================================================================
--- src/list.h (revision 1407)
+++ src/list.h (working copy)
@@ -79,6 +79,11 @@
// until the next change is made to this list.
Vector<T> AddBlock(const T& value, int count);
+ // Inserts a copy of the given element at index i in the list. All
+ // elements formerly at or above i are moved up and the length of
+ // the list increases by one.
+ T& Insert(int i, const T& element);
+
// Removes the i'th element without deleting it even if T is a
// pointer type; moves all elements above i "down". Returns the
// removed element.
« no previous file with comments | « no previous file | src/list-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698