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

Unified Diff: Source/core/css/RuleSet.cpp

Issue 167123002: Simpler return value from HashTable::add()/HashMap::add() and others (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 | « Source/core/css/RuleFeature.cpp ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/RuleSet.cpp
diff --git a/Source/core/css/RuleSet.cpp b/Source/core/css/RuleSet.cpp
index 5180147f1126b1fb172e9d7912447c95d9a785a6..1d7a33413505e1ee2c626654230b05d09dde7f88 100644
--- a/Source/core/css/RuleSet.cpp
+++ b/Source/core/css/RuleSet.cpp
@@ -212,7 +212,7 @@ RuleData::RuleData(StyleRule* rule, unsigned selectorIndex, unsigned position, A
void RuleSet::addToRuleSet(const AtomicString& key, PendingRuleMap& map, const RuleData& ruleData)
{
- OwnPtr<LinkedStack<RuleData> >& rules = map.add(key, nullptr).iterator->value;
+ OwnPtr<LinkedStack<RuleData> >& rules = map.add(key, nullptr).storedValue->value;
if (!rules)
rules = adoptPtr(new LinkedStack<RuleData>);
rules->push(ruleData);
@@ -426,7 +426,7 @@ void RuleSet::compactPendingRules(PendingRuleMap& pendingMap, CompactRuleMap& co
PendingRuleMap::iterator end = pendingMap.end();
for (PendingRuleMap::iterator it = pendingMap.begin(); it != end; ++it) {
OwnPtr<LinkedStack<RuleData> > pendingRules = it->value.release();
- CompactRuleMap::iterator compactRules = compactMap.add(it->key, nullptr).iterator;
+ CompactRuleMap::ValueType* compactRules = compactMap.add(it->key, nullptr).storedValue;
TerminatedArrayBuilder<RuleData> builder(compactRules->value.release());
builder.grow(pendingRules->size());
« no previous file with comments | « Source/core/css/RuleFeature.cpp ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698