Chromium Code Reviews| 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..6ca8d700ddfd6e229ffe2f02984cc357ce5d3424 100644 |
| --- a/third_party/WebKit/Source/wtf/text/WTFString.h |
| +++ b/third_party/WebKit/Source/wtf/text/WTFString.h |
| @@ -90,8 +90,12 @@ 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(characters, |
|
esprehn
2017/01/27 09:25:51
Delegate to the other constructor.
: String(reint
kinuko
2017/01/27 12:52:24
Good idea, done.
|
| + characters ? strlen(reinterpret_cast<const char*>(characters)) |
| + : 0) {} |
| + String(const char* characters) |
| + : String(characters, characters ? strlen(characters) : 0) {} |
| // Construct a string referencing an existing StringImpl. |
| String(StringImpl* impl) : m_impl(impl) {} |