Title: [112543] trunk/Source/WTF
- Revision
- 112543
- Author
- [email protected]
- Date
- 2012-03-29 10:03:59 -0700 (Thu, 29 Mar 2012)
Log Message
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[]):
Modified Paths
Diff
Modified: trunk/Source/WTF/ChangeLog (112542 => 112543)
--- trunk/Source/WTF/ChangeLog 2012-03-29 16:54:39 UTC (rev 112542)
+++ trunk/Source/WTF/ChangeLog 2012-03-29 17:03:59 UTC (rev 112543)
@@ -1,3 +1,17 @@
+2012-03-29 Andreas Kling <[email protected]>
+
+ 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[]):
+
2012-03-28 Carlos Garcia Campos <[email protected]>
[GTK] Implement PlatformStrategies
Modified: trunk/Source/WTF/wtf/text/WTFString.h (112542 => 112543)
--- trunk/Source/WTF/wtf/text/WTFString.h 2012-03-29 16:54:39 UTC (rev 112542)
+++ trunk/Source/WTF/wtf/text/WTFString.h 2012-03-29 17:03:59 UTC (rev 112543)
@@ -186,7 +186,7 @@
{
if (!m_impl || index >= m_impl->length())
return 0;
- return m_impl->characters()[index];
+ return (*m_impl)[index];
}
static String number(short);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes