зеркало из https://github.com/mozilla/pjs.git
some nsString->nsAutoString cleanup
This commit is contained in:
Родитель
0a1cdb9dd2
Коммит
0565a0e3d8
|
@ -201,7 +201,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetCharset(PRUnichar * *aCharset)
|
||||||
rv = prefs->CopyCharPref("intl.character_set_name", &prefCharset);
|
rv = prefs->CopyCharPref("intl.character_set_name", &prefCharset);
|
||||||
}
|
}
|
||||||
|
|
||||||
nsString prefCharsetStr;
|
nsAutoString prefCharsetStr;
|
||||||
if(prefCharset)
|
if(prefCharset)
|
||||||
{
|
{
|
||||||
prefCharsetStr = prefCharset;
|
prefCharsetStr = prefCharset;
|
||||||
|
@ -229,7 +229,7 @@ NS_IMETHODIMP nsMsgDBFolder::SetCharset(const PRUnichar * aCharset)
|
||||||
rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
|
rv = GetDBFolderInfoAndDB(getter_AddRefs(folderInfo), getter_AddRefs(db));
|
||||||
if(NS_SUCCEEDED(rv))
|
if(NS_SUCCEEDED(rv))
|
||||||
{
|
{
|
||||||
nsString charset(aCharset);
|
nsAutoString charset(aCharset);
|
||||||
rv = folderInfo->SetCharacterSet(&charset);
|
rv = folderInfo->SetCharacterSet(&charset);
|
||||||
db->Commit(nsMsgDBCommitType::kLargeCommit);
|
db->Commit(nsMsgDBCommitType::kLargeCommit);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1702,7 +1702,7 @@ NS_IMETHODIMP nsMsgFolder::SetNumNewMessages(PRInt32 aNumNewMessages)
|
||||||
NS_IMETHODIMP nsMsgFolder::GetNewMessagesNotificationDescription(PRUnichar * *aDescription)
|
NS_IMETHODIMP nsMsgFolder::GetNewMessagesNotificationDescription(PRUnichar * *aDescription)
|
||||||
{
|
{
|
||||||
nsresult rv;
|
nsresult rv;
|
||||||
nsString description("");
|
nsAutoString description("");
|
||||||
nsCOMPtr<nsIMsgIncomingServer> server;
|
nsCOMPtr<nsIMsgIncomingServer> server;
|
||||||
rv = GetServer(getter_AddRefs(server));
|
rv = GetServer(getter_AddRefs(server));
|
||||||
|
|
||||||
|
|
|
@ -279,8 +279,8 @@ PRBool nsMsgI18Nstateful_charset(const char *charset)
|
||||||
PRBool nsMsgI18N7bit_data_part(const char *charset, const char *inString, const PRUint32 size)
|
PRBool nsMsgI18N7bit_data_part(const char *charset, const char *inString, const PRUint32 size)
|
||||||
{
|
{
|
||||||
char *aCString;
|
char *aCString;
|
||||||
nsString aCharset(charset);
|
nsAutoString aCharset(charset);
|
||||||
nsString outString;
|
nsAutoString outString;
|
||||||
nsresult res;
|
nsresult res;
|
||||||
|
|
||||||
aCString = (char *) PR_Malloc(size + 1);
|
aCString = (char *) PR_Malloc(size + 1);
|
||||||
|
|
|
@ -28,7 +28,6 @@
|
||||||
#include "nsFileSpec.h"
|
#include "nsFileSpec.h"
|
||||||
#include "nsIServiceManager.h"
|
#include "nsIServiceManager.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsString.h"
|
|
||||||
#include "nsIImapUrl.h"
|
#include "nsIImapUrl.h"
|
||||||
#include "nsIMailboxUrl.h"
|
#include "nsIMailboxUrl.h"
|
||||||
#include "nsINntpUrl.h"
|
#include "nsINntpUrl.h"
|
||||||
|
@ -50,7 +49,7 @@ nsresult GetMessageServiceProgIDForURI(const char *uri, nsString &progID)
|
||||||
|
|
||||||
nsresult rv = NS_OK;
|
nsresult rv = NS_OK;
|
||||||
//Find protocol
|
//Find protocol
|
||||||
nsString uriStr = uri;
|
nsAutoString uriStr(uri);
|
||||||
PRInt32 pos = uriStr.FindChar(':');
|
PRInt32 pos = uriStr.FindChar(':');
|
||||||
if(pos == -1)
|
if(pos == -1)
|
||||||
return NS_ERROR_FAILURE;
|
return NS_ERROR_FAILURE;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче