Changeset 19606 in webkit


Ignore:
Timestamp:
Feb 13, 2007, 10:32:28 AM (19 years ago)
Author:
darin
Message:

JavaScriptCore:

Reviewed by Darin.

  • wtf/Vector.h: fixed comparison operators (WTF::operator==): (WTF::operator!=):

WebCore:

Reviewed by Darin.

  • rendering/RenderStyle.h: Added a != operator for StyleDashboardRegion. The only reason this compiled before was that the comparing two vectors with a != was simply comparing the pointers.
Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r19559 r19606  
     12007-02-13  Dex Deacon  <occupant4@gmail.com>
     2
     3        Reviewed by Darin.
     4
     5        - fix for http://bugs.webkit.org/show_bug.cgi?id=12750
     6          Vector operator== was not defined correctly. It returned void,
     7          did not accept const Vectors, and used an int instead of size_t.
     8
     9        * wtf/Vector.h: fixed comparison operators
     10        (WTF::operator==):
     11        (WTF::operator!=):
     12
    1132007-02-10  David Carson  <dacarson@gmail.com>
    214
  • trunk/JavaScriptCore/wtf/Vector.h

    r18203 r19606  
    664664
    665665    template<typename T, size_t inlineCapacity>
    666     void operator==(Vector<T, inlineCapacity>& a, Vector<T, inlineCapacity>& b)
     666    bool operator==(const Vector<T, inlineCapacity>& a, const Vector<T, inlineCapacity>& b)
    667667    {
    668668        if (a.size() != b.size())
    669669            return false;
    670670
    671         for (int i = 0; i < a.size(); ++i)
     671        for (size_t i = 0; i < a.size(); ++i)
    672672            if (a[i] != b[i])
    673673                return false;
     
    677677
    678678    template<typename T, size_t inlineCapacity>
    679     inline void operator!=(Vector<T, inlineCapacity>& a, Vector<T, inlineCapacity>& b)
     679    inline bool operator!=(const Vector<T, inlineCapacity>& a, const Vector<T, inlineCapacity>& b)
    680680    {
    681681        return !(a == b);
  • trunk/WebCore/ChangeLog

    r19604 r19606  
     12007-02-13  Dex Deacon  <occupant4@gmail.com>
     2
     3        Reviewed by Darin.
     4
     5        - fix for http://bugs.webkit.org/show_bug.cgi?id=12750
     6          Vector operator== was not defined correctly. It returned void,
     7          did not accept const Vectors, and used an int instead of size_t.
     8
     9        * rendering/RenderStyle.h: Added a != operator for StyleDashboardRegion.
     10        The only reason this compiled before was that the comparing two vectors
     11        with a != was simply comparing the pointers.
     12
    1132007-02-13  Darin Adler  <darin@apple.com>
    214
  • trunk/WebCore/rendering/RenderStyle.h

    r18874 r19606  
    382382        return type == o.type && offset == o.offset && label == o.label;
    383383    }
     384
     385   bool operator!=(const StyleDashboardRegion& o) const
     386   {
     387       return !(*this == o);
     388   }
    384389};
    385390
Note: See TracChangeset for help on using the changeset viewer.