[webkit-reviews] review granted: [Bug 53266] Add WTFString method to compare equality with Vector<UChar> : [Attachment 80373] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 27 16:59:48 PST 2011


Eric Seidel <eric at webkit.org> has granted Adam Barth <abarth at webkit.org>'s
request for review:
Bug 53266: Add WTFString method to compare equality with Vector<UChar>
https://bugs.webkit.org/show_bug.cgi?id=53266

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

------- Additional Comments from Eric Seidel <eric at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=80373&action=review

Seems OK.

> Source/JavaScriptCore/wtf/text/StringImpl.h:366
> +    if (!a.size())
> +	   return true;
> +    return !memcmp(a.data(), b->characters(), b->length());

Is calling memcmp with length = 0 OK?  If so then you don't need the !a.size()
check.


More information about the webkit-reviews mailing list