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

Unified Diff: src/list.h

Issue 10006032: Use SortedListBSearch instead of custom one in heap profiler (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 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 | « 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 11245)
+++ src/list.h (working copy)
@@ -173,10 +173,12 @@
// Perform binary search for an element in an already sorted
// list. Returns the index of the element of -1 if it was not found.
+// |cmp| is a predicate that takes a pointer to an element of the List
+// and returns +1 if it is greater, -1 if it is less than the element
+// being searched.
+template <typename T, class P>
+int SortedListBSearch(const List<T>& list, P cmp);
template <typename T>
-int SortedListBSearch(
- const List<T>& list, T elem, int (*cmp)(const T* x, const T* y));
-template <typename T>
int SortedListBSearch(const List<T>& list, T elem);
« 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