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

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

Issue 2140353002: Move StringView constructors into WTFString.h/AtomicString.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unused constructor. Created 4 years, 5 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
Index: third_party/WebKit/Source/wtf/text/AtomicString.h
diff --git a/third_party/WebKit/Source/wtf/text/AtomicString.h b/third_party/WebKit/Source/wtf/text/AtomicString.h
index 7345d827ab8fca6edbb485dad54be5dd05b369e2..b2a8e54bbf49c70607306ced6bb398007ce114f5 100644
--- a/third_party/WebKit/Source/wtf/text/AtomicString.h
+++ b/third_party/WebKit/Source/wtf/text/AtomicString.h
@@ -25,6 +25,7 @@
#include "wtf/HashTableDeletedValueType.h"
#include "wtf/WTFExport.h"
#include "wtf/text/CString.h"
+#include "wtf/text/StringView.h"
#include "wtf/text/WTFString.h"
#include <cstring>
#include <iosfwd>
@@ -206,6 +207,13 @@ template<> struct DefaultHash<AtomicString> {
// double-quotes, and escapes chracters other than ASCII printables.
WTF_EXPORT std::ostream& operator<<(std::ostream&, const AtomicString&);
+inline StringView::StringView(const AtomicString& string, unsigned offset, unsigned length)
+ : StringView(string.impl(), offset, length) {}
+inline StringView::StringView(const AtomicString& string, unsigned offset)
+ : StringView(string.impl(), offset) {}
+inline StringView::StringView(const AtomicString& string)
+ : StringView(string.impl()) {}
+
} // namespace WTF
WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString);
« no previous file with comments | « third_party/WebKit/Source/core/css/parser/CSSParserToken.h ('k') | third_party/WebKit/Source/wtf/text/StringView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698