Chromium Code Reviews| Index: third_party/WebKit/Source/wtf/text/StringBuilder.h |
| diff --git a/third_party/WebKit/Source/wtf/text/StringBuilder.h b/third_party/WebKit/Source/wtf/text/StringBuilder.h |
| index 73cc2655e83cf11ef4f42de10b749a4c8ea74ab4..0261743fa17d196a3a66c761b58e732c871ec51d 100644 |
| --- a/third_party/WebKit/Source/wtf/text/StringBuilder.h |
| +++ b/third_party/WebKit/Source/wtf/text/StringBuilder.h |
| @@ -50,26 +50,6 @@ public: |
| ALWAYS_INLINE void append(const char* characters, unsigned length) { append(reinterpret_cast<const LChar*>(characters), length); } |
| - void append(const String& string) |
| - { |
| - if (!string.length()) |
| - return; |
| - |
| - // If we're appending to an empty string, and there is not a buffer (reserveCapacity has not been called) |
| - // then just retain the string. |
| - if (!m_length && !m_buffer) { |
|
esprehn
2016/05/26 20:59:08
I did actually remove this optimization, but I aud
|
| - m_string = string; |
| - m_length = string.length(); |
| - m_is8Bit = m_string.is8Bit(); |
| - return; |
| - } |
| - |
| - if (string.is8Bit()) |
| - append(string.characters8(), string.length()); |
| - else |
| - append(string.characters16(), string.length()); |
| - } |
| - |
| void append(const StringBuilder& other) |
| { |
| if (!other.m_length) |
| @@ -89,7 +69,9 @@ public: |
| append(other.characters16(), other.m_length); |
| } |
| - void append(const String& string, unsigned offset, unsigned length) |
| + // TODO(esprehn): This method is just duplicating what StringView itself |
| + // does. Remove it and replace callers with append(StringView(string, offset, length)). |
| + void append(const StringView& string, unsigned offset, unsigned length) |
| { |
| if (!string.length()) |
| return; |
| @@ -115,12 +97,6 @@ public: |
| append(string.characters16(), string.length()); |
| } |
| - void append(const char* characters) |
| - { |
| - if (characters) |
| - append(characters, strlen(characters)); |
| - } |
| - |
| void append(UChar c) |
| { |
| if (m_buffer && m_length < m_buffer->length() && m_string.isNull()) { |