From baf5b305890a30ce0466d9ceb81ad02ff1686ef6 Mon Sep 17 00:00:00 2001 From: "scc%netscape.com" Date: Sun, 26 Mar 2000 12:14:14 +0000 Subject: [PATCH] small changes to clients of string converting APIs --- mailnews/base/util/nsMsgDBFolder.cpp | 2 +- mailnews/base/util/nsMsgFolder.cpp | 4 ++-- mailnews/base/util/nsMsgIncomingServer.cpp | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mailnews/base/util/nsMsgDBFolder.cpp b/mailnews/base/util/nsMsgDBFolder.cpp index 6185cddc203..f22d7308a4e 100644 --- a/mailnews/base/util/nsMsgDBFolder.cpp +++ b/mailnews/base/util/nsMsgDBFolder.cpp @@ -220,7 +220,7 @@ NS_IMETHODIMP nsMsgDBFolder::GetCharset(PRUnichar * *aCharset) if(!aCharset) return NS_ERROR_NULL_POINTER; - if(mCharset == "") + if(mCharset.IsEmpty()) { NS_WITH_SERVICE(nsIPref, prefs, kPrefServiceCID, &rv); diff --git a/mailnews/base/util/nsMsgFolder.cpp b/mailnews/base/util/nsMsgFolder.cpp index 80a4ee94a7d..a3c07d5dc02 100644 --- a/mailnews/base/util/nsMsgFolder.cpp +++ b/mailnews/base/util/nsMsgFolder.cpp @@ -1868,7 +1868,7 @@ NS_IMETHODIMP nsMsgFolder::GetNewMessagesNotificationDescription(PRUnichar * *aD nsXPIDLString folderName; rv = GetPrettyName(getter_Copies(folderName)); if (NS_SUCCEEDED(rv) && folderName) - description = folderName; + description.Assign(folderName); } // append the server name @@ -1879,7 +1879,7 @@ NS_IMETHODIMP nsMsgFolder::GetNewMessagesNotificationDescription(PRUnichar * *aD // in case the above failed if (!(mFlags & MSG_FOLDER_FLAG_INBOX)) description += " on "; - description += serverName; + description.Append(serverName); } } *aDescription = description.ToNewUnicode(); diff --git a/mailnews/base/util/nsMsgIncomingServer.cpp b/mailnews/base/util/nsMsgIncomingServer.cpp index 83cd84c0f3b..bc65f217afd 100644 --- a/mailnews/base/util/nsMsgIncomingServer.cpp +++ b/mailnews/base/util/nsMsgIncomingServer.cpp @@ -167,7 +167,7 @@ nsMsgIncomingServer::GetServerURI(char **aResult) rv = GetLocalStoreType(getter_Copies(localStoreType)); if (NS_FAILED(rv)) return rv; - uri += localStoreType; + uri.Append(localStoreType); uri += "://"; nsXPIDLCString username; @@ -179,7 +179,7 @@ nsMsgIncomingServer::GetServerURI(char **aResult) nsEscape(username, url_XAlphas); // nsEscape(username, url_Path); // not all servers have a username - uri += escapedUsername; + uri.Append(escapedUsername); uri += '@'; } @@ -191,7 +191,7 @@ nsMsgIncomingServer::GetServerURI(char **aResult) *((char **)getter_Copies(escapedHostname)) = nsEscape(hostname, url_Path); // not all servers have a hostname - uri += escapedHostname; + uri.Append(escapedHostname); } *aResult = uri.ToNewCString(); @@ -495,7 +495,7 @@ nsMsgIncomingServer::GetPrettyName(PRUnichar **retval) { if (NS_FAILED(rv)) return rv; if ((const char*)username && PL_strcmp((const char*)username, "")!=0) { - prettyName = username; + prettyName.Assign(username); prettyName += " on "; } @@ -679,7 +679,7 @@ nsMsgIncomingServer::SetDefaultLocalPath(nsIFileSpec *aDefaultLocalPath) GetType(getter_Copies(type)); nsCAutoString progid(NS_MSGPROTOCOLINFO_PROGID_PREFIX); - progid += type; + progid.Append(type); NS_WITH_SERVICE(nsIMsgProtocolInfo, protocolInfo, progid, &rv); if (NS_FAILED(rv)) return rv; @@ -708,7 +708,7 @@ nsMsgIncomingServer::GetLocalPath(nsIFileSpec **aLocalPath) GetType(getter_Copies(type)); nsCAutoString progid(NS_MSGPROTOCOLINFO_PROGID_PREFIX); - progid += type; + progid.Append(type); NS_WITH_SERVICE(nsIMsgProtocolInfo, protocolInfo, progid, &rv); if (NS_FAILED(rv)) return rv;