From 7a913b8795a881cdd0a2e0e8c332434a77158098 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 6185cddc2035..f22d7308a4ea 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 80a4ee94a7d5..a3c07d5dc025 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 83cd84c0f3bb..bc65f217afde 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;