mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-15 19:20:13 +00:00
small changes to clients of string converting APIs
This commit is contained in:
parent
210cd384fb
commit
629fdae885
@ -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 += "/";
|
||||
|
@ -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));
|
||||
|
@ -143,7 +143,7 @@ nsInstallFolder::nsInstallFolder(nsInstallFolder& inFolder, const nsString& subS
|
||||
{
|
||||
*mFileSpec = *inFolder.mFileSpec;
|
||||
|
||||
if (subString != "")
|
||||
if (!subString.IsEmpty())
|
||||
*mFileSpec += subString;
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user