[webkit-reviews] review granted: [Bug 73370] Hash* iterators should allow comparison between const and non-const versions : [Attachment 117060] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 30 17:51:35 PST 2011


Darin Adler <darin at apple.com> has granted David Levin <levin at chromium.org>'s
request for review:
Bug 73370: Hash* iterators should allow comparison between const and non-const
versions
https://bugs.webkit.org/show_bug.cgi?id=73370

Attachment 117060: Patch
https://bugs.webkit.org/attachment.cgi?id=117060&action=review

------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=117060&action=review


> Source/JavaScriptCore/wtf/HashTable.h:197
> +	   bool operator==(const iterator& other) const
> +	   {
> +	       return *this == static_cast<const_iterator>(other);
> +	   }
> +	   bool operator!=(const iterator& other) const
> +	   {
> +	       return *this != static_cast<const_iterator>(other);
> +	   }

We don’t have to change the type like this. We can just write:

    return get() == other.get();


More information about the webkit-reviews mailing list