Closed Bug 1187188 Opened 10 years ago Closed 10 years ago

Replace nsBaseHashtable::Enumerate() calls in comm-central with iterators

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(thunderbird46 unaffected, thunderbird47 fixed)

RESOLVED FIXED
Thunderbird 47.0
Tracking Status
thunderbird46 --- unaffected
thunderbird47 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(4 files)

Because iterators are so much nicer than enumerate functions. There are 13 occurrences of Enumerate() in comm-central: - 1 in mailnews/addrbook/src/nsAbMDBDirectory.cpp - 1 in mailnews/base/util/nsMsgIncomingServer.cpp - 11 in mailnews/base/src/nsMsgAccountManager.cpp A note to the assignee: to preserve existing behaviour, you should probably use nsBaseHashtable::Iterator::Data() rather than nsBaseHashtable::Iterator::UserData(). (The latter should be used when replacing nsBaseHashtable::EnumerateRead()).
Depends on: 1221414
Assignee: nobody → n.nethercote
Status: NEW → ASSIGNED
I've checked that these patches compile but have not done any testing. Please check them carefully before landing. I will land the patches that remove the old enumeration functions in a couple of days, to give you some time to land these first. This is the last of my PLDHashTable/nsTHashtable/nsBaseHashtable refactorings for now :)
Thanks or doing these, Nicholas. Just started to look at them today, it's been hectic!
Attachment #8714132 - Flags: review?(rkent) → review+
Attachment #8714133 - Flags: review?(rkent) → review+
Attachment #8714134 - Flags: review?(rkent) → review+
Attachment #8714135 - Flags: review?(rkent) → review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: