Bug 1695162 - Use range-based for instead of custom hashtable iterators. r=xpcom-reviewers,kmag

Differential Revision: https://phabricator.services.mozilla.com/D108585
This commit is contained in:
Simon Giesecke
2021-03-17 15:49:46 +00:00
parent 80bc20a338
commit 86e29e162f
87 changed files with 555 additions and 550 deletions

View File

@@ -616,11 +616,10 @@ bool nsHTMLDocument::ResolveName(JSContext* aCx, const nsAString& aName,
}
void nsHTMLDocument::GetSupportedNames(nsTArray<nsString>& aNames) {
for (auto iter = mIdentifierMap.Iter(); !iter.Done(); iter.Next()) {
IdentifierMapEntry* entry = iter.Get();
if (entry->HasNameElement() ||
entry->HasIdElementExposedAsHTMLDocumentProperty()) {
aNames.AppendElement(entry->GetKeyAsString());
for (const auto& entry : mIdentifierMap) {
if (entry.HasNameElement() ||
entry.HasIdElementExposedAsHTMLDocumentProperty()) {
aNames.AppendElement(entry.GetKeyAsString());
}
}
}