From db063bf443eb034a79af6fc177abdd7ed1095a2c Mon Sep 17 00:00:00 2001 From: "scc%netscape.com" Date: Thu, 27 Apr 2000 22:09:11 +0000 Subject: [PATCH] making string conversions explicit --- mailnews/import/eudora/src/nsEudoraAddress.cpp | 2 +- mailnews/import/eudora/src/nsEudoraMac.cpp | 4 ++-- mailnews/import/src/nsImportFieldMap.cpp | 2 +- mailnews/import/src/nsImportMail.cpp | 2 +- mailnews/import/text/src/nsTextImport.cpp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mailnews/import/eudora/src/nsEudoraAddress.cpp b/mailnews/import/eudora/src/nsEudoraAddress.cpp index bfa7be794ee..3ac7dc160fd 100644 --- a/mailnews/import/eudora/src/nsEudoraAddress.cpp +++ b/mailnews/import/eudora/src/nsEudoraAddress.cpp @@ -583,7 +583,7 @@ void nsEudoraAddress::ResolveEntries( nsCString& name, nsVoidArray& list, nsVoid for (i = 0; i < max; i++) { pData = (CAliasData *)list.ElementAt( i); // resolve the email to an existing alias! - if (name.Compare( (const char *)pData->m_email, PR_TRUE) && ((pEntry = ResolveAlias( pData->m_email)) != nsnull)) { + if (name.CompareWithConversion( (const char *)pData->m_email, PR_TRUE) && ((pEntry = ResolveAlias( pData->m_email)) != nsnull)) { // This new entry has all of the entries for this puppie. // Resolve all of it's entries! ResolveEntries( pEntry->m_name, pEntry->m_list, result); diff --git a/mailnews/import/eudora/src/nsEudoraMac.cpp b/mailnews/import/eudora/src/nsEudoraMac.cpp index d3c168455b0..f54e9812329 100644 --- a/mailnews/import/eudora/src/nsEudoraMac.cpp +++ b/mailnews/import/eudora/src/nsEudoraMac.cpp @@ -985,7 +985,7 @@ PRBool nsEudoraMac::IsValidMailFolderName( nsCString& name) return( PR_TRUE); for (int i = 0; i < kNumBadFolderNames; i++) { - if (!name.Compare( cBadFolderNames[i], PR_TRUE)) + if (!name.CompareWithConversion( cBadFolderNames[i], PR_TRUE)) return( PR_FALSE); } @@ -997,7 +997,7 @@ PRBool nsEudoraMac::IsValidMailboxName( nsCString& fName) { if (m_depth > 1) return( PR_TRUE); - if (!fName.Compare( "Eudora Nicknames", PR_TRUE)) + if (!fName.CompareWithConversion( "Eudora Nicknames", PR_TRUE)) return( PR_FALSE); return( PR_TRUE); } diff --git a/mailnews/import/src/nsImportFieldMap.cpp b/mailnews/import/src/nsImportFieldMap.cpp index 4d7d12ced79..22902a15c2c 100644 --- a/mailnews/import/src/nsImportFieldMap.cpp +++ b/mailnews/import/src/nsImportFieldMap.cpp @@ -575,7 +575,7 @@ PRInt32 nsImportFieldMap::FindFieldNum( const PRUnichar *pDesc) nsString * pStr; for (PRInt32 i = 0; i < m_mozFieldCount; i++) { pStr = (nsString *)m_descriptions.ElementAt( i); - if (!pStr->Compare( pDesc)) + if (!pStr->Compare( nsAutoString(pDesc))) return( i); } diff --git a/mailnews/import/src/nsImportMail.cpp b/mailnews/import/src/nsImportMail.cpp index 2dbe50f281e..2b25f204718 100644 --- a/mailnews/import/src/nsImportMail.cpp +++ b/mailnews/import/src/nsImportMail.cpp @@ -1064,7 +1064,7 @@ void nsImportGenericMail::GetUniquePrettyName( nsIMsgAccountManager *pMgr, nsStr nsXPIDLString prettyName; rv = server->GetPrettyName( getter_Copies( prettyName)); if (NS_SUCCEEDED( rv)) { - if (!newName.Compare( prettyName, PR_TRUE)) + if (!newName.Compare( nsAutoString(prettyName), PR_TRUE)) found = PR_TRUE; } } diff --git a/mailnews/import/text/src/nsTextImport.cpp b/mailnews/import/text/src/nsTextImport.cpp index 70f5c613bf0..b348385f16a 100644 --- a/mailnews/import/text/src/nsTextImport.cpp +++ b/mailnews/import/text/src/nsTextImport.cpp @@ -779,7 +779,7 @@ void ImportAddressImpl::SaveFieldMap( nsIImportFieldMap *pMap) nsXPIDLCString prefStr; rv = prefs->CopyCharPref( "mailnews.import.text.fieldmap", getter_Copies(prefStr)); if (NS_SUCCEEDED( rv)) { - if (!str.Compare( (const char *)prefStr)) + if (!str.Compare( nsCAutoString((const char *)prefStr))) done = PR_TRUE; } if (!done) {