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

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

Issue 2655853003: Replace StringImpl::empty{16Bit}() with a static member (Closed)
Patch Set: 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/WTFString.cpp
diff --git a/third_party/WebKit/Source/wtf/text/WTFString.cpp b/third_party/WebKit/Source/wtf/text/WTFString.cpp
index 0cfe47326d65f40620f44f709acac7a528ad8d3e..734f396c21591f01783de4b54d642d70880c790c 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.cpp
+++ b/third_party/WebKit/Source/wtf/text/WTFString.cpp
@@ -260,7 +260,7 @@ void String::ensure16Bit() {
m_impl =
make16BitFrom8BitSource(m_impl->characters8(), length).releaseImpl();
else
- m_impl = StringImpl::empty16Bit();
+ m_impl = StringImpl::empty16Bit;
}
void String::truncate(unsigned length) {
@@ -785,12 +785,12 @@ String String::fromUTF8WithLatin1Fallback(const LChar* string, size_t size) {
}
const String& emptyString() {
- DEFINE_STATIC_LOCAL(String, emptyString, (StringImpl::empty()));
+ DEFINE_STATIC_LOCAL(String, emptyString, (StringImpl::empty));
return emptyString;
esprehn 2017/02/01 05:23:44 We should probably make these statics too.
Charlie Harrison 2017/02/01 05:29:48 Yeah I can probably do another patch for this, but
esprehn 2017/02/01 05:47:39 That seems like a reasonable thing to do. Add Stri
}
const String& emptyString16Bit() {
- DEFINE_STATIC_LOCAL(String, emptyString, (StringImpl::empty16Bit()));
+ DEFINE_STATIC_LOCAL(String, emptyString, (StringImpl::empty16Bit));
return emptyString;
}
« no previous file with comments | « third_party/WebKit/Source/wtf/text/WTFString.h ('k') | third_party/WebKit/Source/wtf/text/WTFStringTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698