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

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

Issue 2500723002: Add UTF-16 string literal constructors to String classes (Closed)
Patch Set: 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..40f5b60137d7081eba4798412e2500e9d00400f7 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.h
+++ b/third_party/WebKit/Source/wtf/text/WTFString.h
@@ -84,6 +84,7 @@ class WTF_EXPORT String {
// Construct a string with UTF-16 data, from a null-terminated source.
String(const UChar*);
+ String(const char16_t* cstr) : String(reinterpret_cast<const UChar*>(cstr)) {}
esprehn 2016/11/14 02:24:15 chars
// 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