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

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

Issue 2500723002: Add UTF-16 string literal constructors to String classes (Closed)
Patch Set: esprehn nit (cstr -> chars) Created 4 years, 1 month 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 2caea6b2921c9eea1f6e01777f0745d543ba8806..9059e88d869c765c31d6b4d271a3a444879d645c 100644
--- a/third_party/WebKit/Source/wtf/text/StringView.h
+++ b/third_party/WebKit/Source/wtf/text/StringView.h
@@ -83,6 +83,8 @@ class WTF_EXPORT StringView {
m_characters16(chars),
m_length(length) {}
StringView(const UChar* chars);
+ StringView(const char16_t* chars)
+ : StringView(reinterpret_cast<const UChar*>(chars)) {}
#if DCHECK_IS_ON()
~StringView();

Powered by Google App Engine
This is Rietveld 408576698