Changeset 106368 in webkit


Ignore:
Timestamp:
Jan 31, 2012 10:06:23 AM (12 years ago)
Author:
andersca@apple.com
Message:

Vector<T>::operator== shouldn't require T to have operator!=
https://bugs.webkit.org/show_bug.cgi?id=77448

Reviewed by Andreas Kling.

Change VectorComparer::compare to use !(a == b) instead of a != b since
it makes more sense for Vector::operator== to use the element's operator==.

  • wtf/Vector.h:
Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r106314 r106368  
     12012-01-31  Anders Carlsson  <andersca@apple.com>
     2
     3        Vector<T>::operator== shouldn't require T to have operator!=
     4        https://bugs.webkit.org/show_bug.cgi?id=77448
     5
     6        Reviewed by Andreas Kling.
     7
     8        Change VectorComparer::compare to use !(a == b) instead of a != b since
     9        it makes more sense for Vector::operator== to use the element's operator==.
     10
     11        * wtf/Vector.h:
     12
    1132012-01-30  Oliver Hunt  <oliver@apple.com>
    214
  • trunk/Source/JavaScriptCore/wtf/Vector.h

    r103833 r106368  
    195195        {
    196196            for (size_t i = 0; i < size; ++i)
    197                 if (a[i] != b[i])
     197                if (!(a[i] == b[i]))
    198198                    return false;
    199199            return true;
Note: See TracChangeset for help on using the changeset viewer.