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

Unified Diff: third_party/WebKit/Source/wtf/text/WTFString.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
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/WTFString.h
diff --git a/third_party/WebKit/Source/wtf/text/WTFString.h b/third_party/WebKit/Source/wtf/text/WTFString.h
index 354001358ba11f6bde98c02a52e155ac3e3f3d57..3c516adf647f803ba4eb9509c21688d456bb787d 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.h
+++ b/third_party/WebKit/Source/wtf/text/WTFString.h
@@ -84,6 +84,8 @@ class WTF_EXPORT String {
// Construct a string with UTF-16 data, from a null-terminated source.
String(const UChar*);
+ String(const char16_t* chars)
+ : String(reinterpret_cast<const UChar*>(chars)) {}
jungshik at Google 2017/03/09 20:33:33 When the C++ spec is strictly interpreted, this ca
// Construct a string with latin1 data.
String(const LChar* characters, unsigned length);
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringView.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698