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

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

Issue 2702403013: Make HashTraits<QualifiedName>::emptyValue return a const reference (Closed)
Patch Set: Global 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..c2969784ce8290e2f6924b8bbe5d450cc05d1c73 100644
--- a/third_party/WebKit/Source/core/dom/QualifiedName.h
+++ b/third_party/WebKit/Source/core/dom/QualifiedName.h
@@ -180,6 +180,11 @@ class CORE_EXPORT QualifiedName {
RefPtr<QualifiedNameImpl> m_impl;
};
+CORE_EXPORT extern const QualifiedName& nullName;
+inline const QualifiedName& QualifiedName::null() {
sof 2017/03/07 12:45:33 I'd prefer to define this 'inplace' with the stati
fs 2017/03/07 13:30:33 Done.
+ return nullName;
+}
+
extern const QualifiedName& anyName;
inline const QualifiedName& anyQName() {
return anyName;
@@ -236,7 +241,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