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

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

Issue 2658703005: Make WTFString constructor that takes const char* call strlen inline (Closed)
Patch Set: delegate ctor 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/WTFString.cpp » ('j') | 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 43a0aeb735fb6407192c8f10ae50d802e8cd3336..a646644807789a4219c8df81af1c953c470596f2 100644
--- a/third_party/WebKit/Source/wtf/text/WTFString.h
+++ b/third_party/WebKit/Source/wtf/text/WTFString.h
@@ -90,8 +90,10 @@ class WTF_EXPORT String {
String(const char* characters, unsigned length);
// Construct a string with latin1 data, from a null-terminated source.
- String(const LChar* characters);
- String(const char* characters);
+ String(const LChar* characters)
+ : String(reinterpret_cast<const char*>(characters)) {}
+ String(const char* characters)
+ : String(characters, characters ? strlen(characters) : 0) {}
// Construct a string referencing an existing StringImpl.
String(StringImpl* impl) : m_impl(impl) {}
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/WTFString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698