From 629fdae88564fd8e17bf678d65e5c6f13cb2a02b Mon Sep 17 00:00:00 2001 From: "scc%netscape.com" Date: Sun, 26 Mar 2000 11:02:30 +0000 Subject: [PATCH] small changes to clients of string converting APIs --- xpinstall/src/nsInstall.cpp | 12 ++++++------ xpinstall/src/nsInstallFile.cpp | 6 +++--- xpinstall/src/nsInstallFolder.cpp | 2 +- xpinstall/src/nsInstallTrigger.cpp | 2 +- xpinstall/src/nsXPInstallManager.cpp | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xpinstall/src/nsInstall.cpp b/xpinstall/src/nsInstall.cpp index 9cf85b9b8748..006abad26945 100644 --- a/xpinstall/src/nsInstall.cpp +++ b/xpinstall/src/nsInstall.cpp @@ -323,7 +323,7 @@ nsInstall::AddDirectory(const nsString& aRegName, } nsString qualifiedVersion = aVersion; - if (qualifiedVersion == "") + if (qualifiedVersion.IsEmpty()) { // assume package version for overriden forms that don't take version info *aReturn = mVersionInfo->ToString(qualifiedVersion); @@ -337,7 +337,7 @@ nsInstall::AddDirectory(const nsString& aRegName, nsString subdirectory(aSubdir); - if (subdirectory != "") + if (!subdirectory.IsEmpty()) { subdirectory.Append("/"); } @@ -381,7 +381,7 @@ nsInstall::AddDirectory(const nsString& aRegName, nsString newSubDir; - if (subdirectory != "") + if (!subdirectory.IsEmpty()) { newSubDir = subdirectory; } @@ -512,7 +512,7 @@ nsInstall::AddSubcomponent(const nsString& aRegName, if( aTargetName.Equals("") ) tempTargetName = aJarSource; - if (qualifiedVersion == "") + if (qualifiedVersion.IsEmpty()) qualifiedVersion.Assign("0.0.0.0"); @@ -923,7 +923,7 @@ nsInstall::Gestalt(const nsString& aSelector, PRInt32* aReturn) OSErr err = noErr; OSType selector; - if (aSelector == "") + if (aSelector.IsEmpty()) { return NS_OK; } @@ -2130,7 +2130,7 @@ nsInstall::GetQualifiedRegName(const nsString& name, nsString& qualifiedRegName } else if ( name.CharAt(0) != '/' ) { - if (mRegistryPackageName != "") + if (!mRegistryPackageName.IsEmpty()) { qualifiedRegName = mRegistryPackageName; qualifiedRegName += "/"; diff --git a/xpinstall/src/nsInstallFile.cpp b/xpinstall/src/nsInstallFile.cpp index 0809f8122070..bac53d6a0572 100644 --- a/xpinstall/src/nsInstallFile.cpp +++ b/xpinstall/src/nsInstallFile.cpp @@ -199,7 +199,7 @@ nsInstallFile::nsInstallFile(nsInstall* inInstall, mInstall->GetRegPackageName(regPackageName); // determine Child status - if ( regPackageName == "" ) + if ( regPackageName.IsEmpty() ) { // in the "current communicator package" absolute pathnames (start // with slash) indicate shared files -- all others are children @@ -359,7 +359,7 @@ nsInstallFile::RegisterInVersionRegistry() if (!mChildFile) { int found; - if (regPackageName != "") + if (!regPackageName.IsEmpty()) { found = VR_UninstallFileExistsInList( (char*)(const char*)nsAutoCString(regPackageName) , (char*)(const char*)nsAutoCString(*mVersionRegistryName)); @@ -417,7 +417,7 @@ nsInstallFile::RegisterInVersionRegistry() if ( !mChildFile && !mUpgradeFile ) { - if (regPackageName != "") + if (!regPackageName.IsEmpty()) { VR_UninstallAddFileToList( (char*)(const char*)nsAutoCString(regPackageName), (char*)(const char*)nsAutoCString(*mVersionRegistryName)); diff --git a/xpinstall/src/nsInstallFolder.cpp b/xpinstall/src/nsInstallFolder.cpp index f88282ff21a4..8db74b3b92ca 100644 --- a/xpinstall/src/nsInstallFolder.cpp +++ b/xpinstall/src/nsInstallFolder.cpp @@ -143,7 +143,7 @@ nsInstallFolder::nsInstallFolder(nsInstallFolder& inFolder, const nsString& subS { *mFileSpec = *inFolder.mFileSpec; - if (subString != "") + if (!subString.IsEmpty()) *mFileSpec += subString; } } diff --git a/xpinstall/src/nsInstallTrigger.cpp b/xpinstall/src/nsInstallTrigger.cpp index e37cf7381485..d721fb33839f 100644 --- a/xpinstall/src/nsInstallTrigger.cpp +++ b/xpinstall/src/nsInstallTrigger.cpp @@ -258,7 +258,7 @@ nsInstallTrigger::ConditionalSoftwareUpdate(const nsString& aURL, const nsString if (!enabled) return NS_OK; - if (aURL == "" || aVersion == nsnull) + if (aURL.IsEmpty() || aVersion == nsnull) { needJar = PR_TRUE; } diff --git a/xpinstall/src/nsXPInstallManager.cpp b/xpinstall/src/nsXPInstallManager.cpp index a9a4d514cc0f..29cceedb9e42 100644 --- a/xpinstall/src/nsXPInstallManager.cpp +++ b/xpinstall/src/nsXPInstallManager.cpp @@ -473,7 +473,7 @@ void nsXPInstallManager::LoadDialogWithNames(nsIDialogParamBlock* ioParamBlock) triggerItem = mTriggers->Get(i); //Check to see if this trigger item has a pretty name - if((moduleName = triggerItem->mName) != "") + if(!(moduleName = triggerItem->mName).IsEmpty()) { ioParamBlock->SetString(paramIndex, moduleName.ToNewUnicode()); paramIndex++;