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

Unified Diff: third_party/WebKit/Source/wtf/text/StringBuilder.cpp

Issue 2668903003: Replace WTF::emptyString{16Bit}() with a static global (Closed)
Patch Set: Replace WTF::emptyString{16Bit}() with a static global Created 3 years, 11 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: third_party/WebKit/Source/wtf/text/StringBuilder.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringBuilder.cpp b/third_party/WebKit/Source/wtf/text/StringBuilder.cpp
index edf7c6a64c0fb28ae9596f0a0b7cff9e8647707e..3086eb99f330e5c68cf1e9a84a10f589d9aa4f47 100644
--- a/third_party/WebKit/Source/wtf/text/StringBuilder.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringBuilder.cpp
@@ -35,7 +35,7 @@ namespace WTF {
String StringBuilder::toString() {
if (!m_length)
- return emptyString();
+ return emptyString;
if (m_string.isNull()) {
if (m_is8Bit)
m_string = String(characters8(), m_length);
@@ -61,7 +61,7 @@ AtomicString StringBuilder::toAtomicString() {
String StringBuilder::substring(unsigned start, unsigned length) const {
if (start >= m_length)
- return emptyString();
+ return emptyString;
if (!m_string.isNull())
return m_string.substring(start, length);
length = std::min(length, m_length - start);
« no previous file with comments | « third_party/WebKit/Source/web/tests/KeyboardTest.cpp ('k') | third_party/WebKit/Source/wtf/text/StringBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698