Closed Bug 1225407 Opened 10 years ago Closed 10 years ago

Replace nsInterfaceHashtable::EnumerateRead() call in SubstitutingProtocolHandler with an iterator

Categories

(Core :: Networking, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla45
Tracking Status
firefox45 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

Details

Attachments

(1 file, 1 obsolete file)

No description provided.
Comment on attachment 8688289 [details] [diff] [review] Replace nsInterfaceHashtable::EnumerateRead() call in SubstitutingProtocolHandler with an iterator Review of attachment 8688289 [details] [diff] [review]: ----------------------------------------------------------------- ::: netwerk/protocol/res/SubstitutingProtocolHandler.cpp @@ +114,5 @@ > void > SubstitutingProtocolHandler::CollectSubstitutions(InfallibleTArray<SubstitutionMapping>& aMappings) > { > + for (auto iter = mSubstitutions.ConstIter(); !iter.Done(); iter.Next()) { > + auto& key = iter.Key(); I'd inline iter.Key() because it's only used once. @@ +115,5 @@ > SubstitutingProtocolHandler::CollectSubstitutions(InfallibleTArray<SubstitutionMapping>& aMappings) > { > + for (auto iter = mSubstitutions.ConstIter(); !iter.Done(); iter.Next()) { > + auto& key = iter.Key(); > + auto& data = iter.Data(); I'd write the type instead of |auto| because the type is non-obvious. I'd also call it |uri| instead of |data|.
Addressed comment 2
Attachment #8688289 - Attachment is obsolete: true
Attachment #8688289 - Flags: review?(michal.novotny)
Attachment #8688709 - Flags: review?(michal.novotny)
Attachment #8688709 - Flags: review?(michal.novotny) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: