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

Unified Diff: third_party/WebKit/Source/wtf/text/StringView.h

Issue 2655853003: Replace StringImpl::empty{16Bit}() with a static member (Closed)
Patch Set: annotate race 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/StringView.h
diff --git a/third_party/WebKit/Source/wtf/text/StringView.h b/third_party/WebKit/Source/wtf/text/StringView.h
index ec078f21b6e62da2815f87e8c4df81d4918ea9e4..bd22113592aef04c8a5665b30bcd2c246b974164 100644
--- a/third_party/WebKit/Source/wtf/text/StringView.h
+++ b/third_party/WebKit/Source/wtf/text/StringView.h
@@ -68,7 +68,7 @@ class WTF_EXPORT StringView {
// From a literal string or LChar buffer:
StringView(const LChar* chars, unsigned length)
- : m_impl(StringImpl::empty()), m_characters8(chars), m_length(length) {}
+ : m_impl(StringImpl::empty), m_characters8(chars), m_length(length) {}
StringView(const char* chars, unsigned length)
: StringView(reinterpret_cast<const LChar*>(chars), length) {}
StringView(const LChar* chars)
@@ -79,7 +79,7 @@ class WTF_EXPORT StringView {
// From a wide literal string or UChar buffer.
StringView(const UChar* chars, unsigned length)
- : m_impl(StringImpl::empty16Bit()),
+ : m_impl(StringImpl::empty16Bit),
m_characters16(chars),
m_length(length) {}
StringView(const UChar* chars);
@@ -203,7 +203,7 @@ inline StringView::StringView(StringImpl& impl,
inline void StringView::clear() {
m_length = 0;
m_bytes = nullptr;
- m_impl = StringImpl::empty(); // mark as 8 bit.
+ m_impl = StringImpl::empty; // mark as 8 bit.
}
inline void StringView::set(const StringImpl& impl,
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringStatics.cpp ('k') | third_party/WebKit/Source/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698