[Webkit-unassigned] [Bug 72294] Add contains() test to Region

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 15 13:52:03 PST 2011


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





--- Comment #25 from Darin Adler <darin at apple.com>  2011-11-15 13:52:03 PST ---
(From update of attachment 115212)
View in context: https://bugs.webkit.org/attachment.cgi?id=115212&action=review

> Source/WebCore/platform/graphics/Region.cpp:87
> +    if (m_spans.size() != other.m_spans.size())
> +        return false;
> +    if (m_segments.size() != other.m_segments.size())
> +        return false;
> +
> +    for (size_t i = 0; i < m_spans.size(); ++i)
> +        if (m_spans[i] != other.m_spans[i])
> +            return false;
> +    for (size_t i = 0; i < m_segments.size(); ++i)
> +        if (m_segments[i] != other.m_segments[i])
> +            return false;
> +
> +    return true;

Vector already handles ==. You should be able to write:

    return m_spans == other.m_spans && m_segments == other.m_segments;

If you can’t, that’s a bug in Vector.

-- 
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