Title: [134791] trunk/Source/WTF
Revision
134791
Author
[email protected]
Date
2012-11-15 10:15:39 -0800 (Thu, 15 Nov 2012)

Log Message

Fix an erroneous comment about the operators required by binarySearch
https://bugs.webkit.org/show_bug.cgi?id=102406

Reviewed by Anders Carlsson.

* wtf/StdLibExtras.h: binarySearch needs '==' and '<', not '--', '<' and '>'.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (134790 => 134791)


--- trunk/Source/WTF/ChangeLog	2012-11-15 18:13:54 UTC (rev 134790)
+++ trunk/Source/WTF/ChangeLog	2012-11-15 18:15:39 UTC (rev 134791)
@@ -1,3 +1,12 @@
+2012-11-15  Maciej Stachowiak  <[email protected]>
+
+        Fix an erroneous comment about the operators required by binarySearch
+        https://bugs.webkit.org/show_bug.cgi?id=102406
+
+        Reviewed by Anders Carlsson.
+
+        * wtf/StdLibExtras.h: binarySearch needs '==' and '<', not '--', '<' and '>'.
+
 2012-11-14  Michael Saboff  <[email protected]>
 
         String::append() should handle two 8 bit strings without converting both to 16 bits

Modified: trunk/Source/WTF/wtf/StdLibExtras.h (134790 => 134791)


--- trunk/Source/WTF/wtf/StdLibExtras.h	2012-11-15 18:13:54 UTC (rev 134790)
+++ trunk/Source/WTF/wtf/StdLibExtras.h	2012-11-15 18:15:39 UTC (rev 134791)
@@ -182,7 +182,7 @@
 };
 
 // Binary search algorithm, calls extractKey on pre-sorted elements in array,
-// compares result with key (KeyTypes should be comparable with '--', '<', '>').
+// compares result with key (KeyTypes should be comparable with '==', and '<').
 template<typename ArrayElementType, typename KeyType, KeyType(*extractKey)(ArrayElementType*)>
 inline ArrayElementType* binarySearch(ArrayElementType* array, size_t size, KeyType key, BinarySearchMode mode = KeyMustBePresentInArray)
 {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to