making string conversions explicit

git-svn-id: svn://10.0.0.236/trunk@67412 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%netscape.com
2000-04-27 21:24:29 +00:00
parent 47f0b60fe6
commit a4e898e031
3 changed files with 4 additions and 4 deletions

View File

@@ -1311,7 +1311,7 @@ nsBrowserWindow::nsBrowserWindow()
#if XXX
gTitleSuffix = GetTitleSuffix();
#endif
if ( gTitleSuffix = new nsString )
if ( (gTitleSuffix = new nsString) != 0 )
gTitleSuffix->AssignWithConversion(" - Raptor");
}
AddBrowser(this);
@@ -2058,7 +2058,7 @@ nsBrowserWindow::FindWebShellWithName(const PRUnichar* aName, nsIWebShell*& aRes
nsXPIDLString name;
nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(mDocShell));
if (NS_OK == docShellAsItem->GetName(getter_Copies(name))) {
if (aNameStr.Equals(name)) {
if (aNameStr.EqualsWithConversion(name)) {
aResult = webShell;
NS_ADDREF(aResult);
return NS_OK;

View File

@@ -435,7 +435,7 @@ nsXPBaseWindow::FindWebShellWithName(const PRUnichar* aName,
if (webShell) {
nsXPIDLString name;
if (NS_SUCCEEDED(docShellAsItem->GetName(getter_Copies(name)))) {
if (aNameStr.Equals(name)) {
if (aNameStr.EqualsWithConversion(name)) {
aResult = webShell;
NS_ADDREF(aResult);
return NS_OK;

View File

@@ -391,7 +391,7 @@ nsHTTPIndexParser::OnStartRequest(nsIChannel* aChannel, nsISupports* aContext)
// we know that this is a directory (due to being a HTTP-INDEX response)
// so ensure it ends with a slash if its a FTP URL
nsAutoString fullURI(uristr);
nsAutoString fullURI; fullURI.AssignWithConversion(uristr);
if ((fullURI.Find("ftp://", PR_TRUE) == 0) && (fullURI.Last() != (PRUnichar('/'))))
{
fullURI.AppendWithConversion('/');