[Webkit-unassigned] [Bug 43841] New: SegmentedVector::operator== typo

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 11 03:02:13 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43841

           Summary: SegmentedVector::operator== typo
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: andrey154 at gmail.com
                CC: darin at apple.com


WTF::SegmentedVector::operator== (in file webkit\JavaScriptCore\wtf\SegmentedVector.h:70) has typo:
        bool operator==(const Iterator& other) const
        {
            return (m_index == other.m_index && m_segment = other.m_segment && &m_vector == &other.m_vector); // HERE: m_segment _=_ other.m_segment
        }

This should be:
        bool operator==(const Iterator& other) const
        {
            return (m_index == other.m_index && m_segment == other.m_segment && &m_vector == &other.m_vector);
        }

Because normaly operator== should be ! operator!=.

        bool operator!=(const Iterator& other) const
        {
            return (m_index != other.m_index || m_segment != other.m_segment || &m_vector != &other.m_vector); // NOTE: m_segment _!=_ other.m_segment 
        }

I don't know consequences of this.

Kind regards,
Andrey

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list