[webkit-reviews] review granted: [Bug 107505] Abstract the logic for appending a UChar32 onto StringBuilder : [Attachment 184246] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 23 09:33:34 PST 2013


Darin Adler <darin at apple.com> has granted Martin Robinson
<mrobinson at webkit.org>'s request for review:
Bug 107505: Abstract the logic for appending a UChar32 onto StringBuilder
https://bugs.webkit.org/show_bug.cgi?id=107505

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

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


Nice improvement at every call site!

> Source/WTF/wtf/text/StringBuilder.h:149
> +	       UChar character = static_cast<UChar>(c);
> +	       ASSERT(character == c);
> +	       append(character);

Tiny nit: This seems like overkill to me. I would follow the CSSOMUtils.cpp
version and just do this.

    append(static_cast<UChar>(c));

We can trust that U_IS_BMP works properly and don’t need to restate what it
does in the form of an assertion.


More information about the webkit-reviews mailing list