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

Unified Diff: third_party/WebKit/Source/core/dom/QualifiedName.h

Issue 2702403013: Make HashTraits<QualifiedName>::emptyValue return a const reference (Closed)
Patch Set: Default inline null() Created 3 years, 9 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/core/dom/QualifiedName.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/QualifiedName.h
diff --git a/third_party/WebKit/Source/core/dom/QualifiedName.h b/third_party/WebKit/Source/core/dom/QualifiedName.h
index 8c6fee54045891b5b072668e9aeeff7ac1c8a32e..a2a725a5382a53b055fed20d8cdabfd92d89e056 100644
--- a/third_party/WebKit/Source/core/dom/QualifiedName.h
+++ b/third_party/WebKit/Source/core/dom/QualifiedName.h
@@ -46,6 +46,8 @@ struct QualifiedNameData {
bool m_isStatic;
};
+CORE_EXPORT extern const class QualifiedName& nullName;
+
class CORE_EXPORT QualifiedName {
USING_FAST_MALLOC(QualifiedName);
@@ -160,7 +162,7 @@ class CORE_EXPORT QualifiedName {
// Init routine for globals
static void initAndReserveCapacityForSize(unsigned size);
- static const QualifiedName& null();
+ static const QualifiedName& null() { return nullName; }
// The below methods are only for creating static global QNames that need no
// ref counting.
@@ -236,7 +238,7 @@ template <>
struct HashTraits<blink::QualifiedName>
: SimpleClassHashTraits<blink::QualifiedName> {
static const bool emptyValueIsZero = false;
- static blink::QualifiedName emptyValue() {
+ static const blink::QualifiedName& emptyValue() {
return blink::QualifiedName::null();
}
};
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/dom/QualifiedName.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698