From f5f752106afa51b1c61d0e8ab99e5cc83de96b83 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Wed, 5 Jan 2000 03:06:03 +0000 Subject: [PATCH] still more nsString->nsAutoString cleanup --- mailnews/base/src/nsMsgAccount.cpp | 2 +- mailnews/base/src/nsMsgAccountManager.cpp | 4 ++-- mailnews/base/src/nsMsgAccountManagerDS.cpp | 2 +- mailnews/base/src/nsMsgFolderDataSource.cpp | 2 +- mailnews/base/src/nsMsgMessageDataSource.cpp | 6 +++--- mailnews/base/src/nsMsgRDFDataSource.cpp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mailnews/base/src/nsMsgAccount.cpp b/mailnews/base/src/nsMsgAccount.cpp index d7f4ff8a6a8..0b539a67a25 100644 --- a/mailnews/base/src/nsMsgAccount.cpp +++ b/mailnews/base/src/nsMsgAccount.cpp @@ -344,7 +344,7 @@ nsMsgAccount::SetKey(const char *accountKey) NS_IMETHODIMP nsMsgAccount::ToString(PRUnichar **aResult) { - nsString val("[nsIMsgAccount: "); + nsAutoString val("[nsIMsgAccount: "); val += m_accountKey; val += "]"; *aResult = val.ToNewUnicode(); diff --git a/mailnews/base/src/nsMsgAccountManager.cpp b/mailnews/base/src/nsMsgAccountManager.cpp index a42dd780001..2c60878c3e3 100644 --- a/mailnews/base/src/nsMsgAccountManager.cpp +++ b/mailnews/base/src/nsMsgAccountManager.cpp @@ -1720,7 +1720,7 @@ nsMsgAccountManager::CreateLocalMailAccount(nsIMsgIdentity *identity) // we don't want "nobody at Local Mail" to show up in the // folder pane, so we set the pretty name to "Local Mail" - nsString localMailFakeHostName(LOCAL_MAIL_FAKE_HOST_NAME); + nsAutoString localMailFakeHostName(LOCAL_MAIL_FAKE_HOST_NAME); server->SetPrettyName(localMailFakeHostName.ToNewUnicode()); // the server needs a username @@ -1864,7 +1864,7 @@ nsMsgAccountManager::MigrateLocalMailAccount(nsIMsgIdentity *identity) // we don't want "nobody at Local Mail" to show up in the // folder pane, so we set the pretty name to "Local Mail" - nsString localMailFakeHostName(LOCAL_MAIL_FAKE_HOST_NAME); + nsAutoString localMailFakeHostName(LOCAL_MAIL_FAKE_HOST_NAME); server->SetPrettyName(localMailFakeHostName.ToNewUnicode()); // create the directory structure for old 4.x "Local Mail" diff --git a/mailnews/base/src/nsMsgAccountManagerDS.cpp b/mailnews/base/src/nsMsgAccountManagerDS.cpp index 5b5bd450a5c..0d10c27e838 100644 --- a/mailnews/base/src/nsMsgAccountManagerDS.cpp +++ b/mailnews/base/src/nsMsgAccountManagerDS.cpp @@ -191,7 +191,7 @@ nsMsgAccountManagerDataSource::GetTarget(nsIRDFResource *source, rv = NS_RDF_NO_VALUE; - nsString str=""; + nsAutoString str(""); if (property == kNC_Name || property == kNC_FolderTreeName) { // XXX these should be localized diff --git a/mailnews/base/src/nsMsgFolderDataSource.cpp b/mailnews/base/src/nsMsgFolderDataSource.cpp index ae7295d87e2..b68584a9ee1 100644 --- a/mailnews/base/src/nsMsgFolderDataSource.cpp +++ b/mailnews/base/src/nsMsgFolderDataSource.cpp @@ -1429,7 +1429,7 @@ nsresult nsMsgFolderDataSource::DoNewFolder(nsIMsgFolder *folder, nsISupportsArr { PRUnichar *name; literal->GetValue(&name); - nsString tempStr = name; + nsAutoString tempStr(name); nsAutoCString nameStr(tempStr); rv = folder->CreateSubfolder(nameStr); diff --git a/mailnews/base/src/nsMsgMessageDataSource.cpp b/mailnews/base/src/nsMsgMessageDataSource.cpp index 0b3641fa324..971934c5488 100644 --- a/mailnews/base/src/nsMsgMessageDataSource.cpp +++ b/mailnews/base/src/nsMsgMessageDataSource.cpp @@ -179,7 +179,7 @@ nsresult nsMsgMessageDataSource::Init() nsresult nsMsgMessageDataSource::CreateLiterals(nsIRDFService *rdf) { - nsString str = " "; + nsAutoString str(" ");; createNode(str, getter_AddRefs(kEmptyStringLiteral), rdf); str = "lowest"; createNode(str, getter_AddRefs(kLowestLiteral), rdf); @@ -1076,7 +1076,7 @@ nsMsgMessageDataSource::createMessageSizeNode(nsIMessage *message, { nsresult rv; PRUint32 size; - nsString sizeStr=""; + nsAutoString sizeStr(""); rv = message->GetMessageSize(&size); if(NS_FAILED(rv)) return rv; @@ -1099,7 +1099,7 @@ nsresult nsMsgMessageDataSource::createMessageTotalNode(nsIMessage *message, nsI nsCOMPtr folder; nsCOMPtr thread; nsresult rv; - nsString emptyString(""); + nsAutoString emptyString(""); PRBool showThreads; GetIsThreaded(&showThreads); diff --git a/mailnews/base/src/nsMsgRDFDataSource.cpp b/mailnews/base/src/nsMsgRDFDataSource.cpp index 68ccda9847b..59223e2beaf 100644 --- a/mailnews/base/src/nsMsgRDFDataSource.cpp +++ b/mailnews/base/src/nsMsgRDFDataSource.cpp @@ -351,7 +351,7 @@ nsresult nsMsgRDFDataSource::NotifyPropertyChanged(nsIRDFResource *resource, const char *newValue) { nsCOMPtr newValueNode; - nsString newValueStr = newValue; + nsAutoString newValueStr(newValue); createNode(newValueStr, getter_AddRefs(newValueNode), getRDFService()); NotifyPropertyChanged(resource, propertyResource, newValueNode); return NS_OK;