String: Subscript operator shouldn't force conversion to 16-bit characters.
authorkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 17:03:59 +0000 (17:03 +0000)
committerkling@webkit.org <kling@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Mar 2012 17:03:59 +0000 (17:03 +0000)
commite22f12d55111d0628b1ad975db761548461652d3
tree3822cc665edb3a9ce074799a7c8dfcd680acdeb1
parent5f931ec2e209a33565b73b0d1fee9d3c7a3773de
String: Subscript operator shouldn't force conversion to 16-bit characters.
<http://webkit.org/b/82613>

Reviewed by Anders Carlsson.

Forward String::operator[] to StringImpl::operator[] instead of indexing into characters().
This avoid implicit conversion of 8-bit strings to 16-bit, and as an example, reduces memory
usage on http://www.allthingsd.com/ by 360kB.

* wtf/text/WTFString.h:
(WTF::String::operator[]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@112543 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WTF/ChangeLog
Source/WTF/wtf/text/WTFString.h