Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1583)

Unified Diff: Source/core/platform/chromium/support/WebString.cpp

Issue 15806014: Reduce usage of WebString::data (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/platform/chromium/support/WebString.cpp
diff --git a/Source/core/platform/chromium/support/WebString.cpp b/Source/core/platform/chromium/support/WebString.cpp
index cac5551b229228b473b7abe490dd4ae33e89388e..c738683ac226fc06ea9c49806804581af12fca44 100644
--- a/Source/core/platform/chromium/support/WebString.cpp
+++ b/Source/core/platform/chromium/support/WebString.cpp
@@ -64,6 +64,12 @@ size_t WebString::length() const
return m_private ? const_cast<WebStringPrivate*>(m_private)->length() : 0;
}
+WebUChar WebString::at(unsigned i) const
+{
+ ASSERT(m_private);
+ return (*m_private)[i];
+}
+
const WebUChar* WebString::data() const
{
return m_private ? const_cast<WebStringPrivate*>(m_private)->characters() : 0;

Powered by Google App Engine
This is Rietveld 408576698