Closed Bug 264765 Opened 20 years ago Closed 20 years ago

nsMsgAccount.cpp cleanup

Categories

(SeaMonkey :: MailNews: Account Configuration, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mikael, Assigned: mikael)

Details

Attachments

(2 files)

remove some dead code in nsMsgAccounty.cpp
Status: NEW → ASSIGNED
Attached patch patchSplinter Review
Attachment #162376 - Flags: superreview?(darin)
Attachment #162376 - Flags: review?(neil.parkwaycc.co.uk)
Comment on attachment 162376 [details] [diff] [review]
patch

Not sure why you asked darin, as opposed to, say, bienvenu for review.

>   nsAutoString val(NS_LITERAL_STRING("[nsIMsgAccount: "));
>-  val.AppendWithConversion(m_accountKey);
>-  val.AppendLiteral("]");
>+  AppendASCIItoUTF16(m_accountKey, val);
>+  val.Append(']');
>   *aResult = ToNewUnicode(val);
As you're changing this anyway here are a couple of alternatives that I
understand might be slightly better string fu: a) nsAutoString val;
val.AppendLiteral("[nsIMsgAccount: "); ... b) *aResult =
ToNewUnicode(NS_LITERAL_STRING("[nsIMsgAccount: "]) +
NS_ConvertASCIItoUTF16(m_accountKey) + NS_LITERAL_STRING("]"));
Attachment #162376 - Flags: review?(neil.parkwaycc.co.uk) → review+
Comment on attachment 162376 [details] [diff] [review]
patch

>Index: mailnews/base/src/nsMsgAccount.cpp

>   nsAutoString val(NS_LITERAL_STRING("[nsIMsgAccount: "));

do this instead:

    nsAutoString val;
    val.AssignLiteral("[nsIMsgAccount: ");


sr=darin
Attachment #162376 - Flags: superreview?(darin) → superreview+
> Not sure why you asked darin, as opposed to, say, bienvenu for review.

yeah, i wondered the same thing... cc'ing bienvenu
Comment on attachment 162376 [details] [diff] [review]
patch

looks ok, but:

-  nsresult rv=NS_OK;
+  nsresult rv;

   // need the prefs service to do anything
   rv = getPrefService();

should just go all the way and say

nsresult rv = getPrefService();
Thx for the reviews!
Attachment #162489 - Attachment description: updated with reviewrs comments → updated with reviewers comments[checked in 20041018]
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: