Closed Bug 669586 Opened 13 years ago Closed 13 years ago

Replace some nsCStringArray instances with nsTArray<nsCString>

Categories

(MailNews Core :: Backend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 8.0

People

(Reporter: standard8, Assigned: standard8)

Details

Attachments

(1 file)

Attached patch The fixSplinter Review
I found this patch in my review queue. I've just checked it works and fixed a couple of things.

It replaces some nsCStringArray instances with nsTArray<nsCString> (we did something similar with nsStringArray and that is now completely dead).
Attachment #544188 - Flags: review?(dbienvenu)
Attachment #544188 - Attachment is patch: true
Comment on attachment 544188 [details] [diff] [review]
The fix

that's some nice cleanup. I haven't run this yet, but here are a couple nits:

don't need the printf:

   NS_ENSURE_SUCCESS(rv, rv);
   m_keys.Clear();
+  printf("Length is %d\n", m_keys.Length());

can you wrap this long line?:

-          rv = compService->ReplyWithTemplate(m_msgToForwardOrReply, replyTemplateUri.get(), msgWindow, server);
+          rv = compService->ReplyWithTemplate(m_msgToForwardOrReply, m_replyTemplateUri[i].get(), msgWindow, server);

the diff of nsAbLDAPCard::GetLDAPMessageInfo is a bit confusing - but I think you can move the setting of index to above the first if, which would reduce code size marginally.
Comment on attachment 544188 [details] [diff] [review]
The fix

r=me, modulo previous nits.
Attachment #544188 - Flags: review?(dbienvenu) → review+
Checked in with nits addressed:

http://hg.mozilla.org/comm-central/rev/9875fdbfc9db
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 8.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: