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

Unified Diff: Source/core/dom/DocumentOrderedMap.h

Issue 123333003: Use a pointer type for values in DocumentOrderedMap (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 12 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 | Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/DocumentOrderedMap.h
diff --git a/Source/core/dom/DocumentOrderedMap.h b/Source/core/dom/DocumentOrderedMap.h
index d1a9c2f075c07e42cafef5a8c421675867a312b9..351e534d606ac60c8a6bb42bb35e8f43850c5de5 100644
--- a/Source/core/dom/DocumentOrderedMap.h
+++ b/Source/core/dom/DocumentOrderedMap.h
@@ -62,11 +62,6 @@ private:
template<bool keyMatches(StringImpl*, Element*)> Element* get(StringImpl*, const TreeScope*) const;
struct MapEntry {
- MapEntry()
- : element(0)
- , count(0)
- { }
-
explicit MapEntry(Element* firstElement)
: element(firstElement)
, count(1)
@@ -77,7 +72,7 @@ private:
Vector<Element*> orderedList;
};
- typedef HashMap<StringImpl*, MapEntry> Map;
+ typedef HashMap<StringImpl*, OwnPtr<MapEntry> > Map;
mutable Map m_map;
};
@@ -90,7 +85,7 @@ inline bool DocumentOrderedMap::contains(StringImpl* id) const
inline bool DocumentOrderedMap::containsMultiple(StringImpl* id) const
{
Map::const_iterator it = m_map.find(id);
- return it != m_map.end() && it->value.count > 1;
+ return it != m_map.end() && it->value->count > 1;
}
} // namespace WebCore
« no previous file with comments | « no previous file | Source/core/dom/DocumentOrderedMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698