Bug 46711. Removed nsAutoString travisty from nsStringKey. Introduced nsCStringKey. Made them both share the underlying string when possible. r=waterson

git-svn-id: svn://10.0.0.236/trunk@75975 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
warren%netscape.com
2000-08-10 06:19:37 +00:00
parent 0a2d2db689
commit e5706a7236
90 changed files with 739 additions and 892 deletions

View File

@@ -510,7 +510,7 @@ nsDirectoryService::Define(const char* prop, nsISupports* initialValue)
NS_IMETHODIMP
nsDirectoryService::Undefine(const char* prop)
{
nsStringKey key(prop);
nsCStringKey key(prop);
if (!mHashtable->Exists(&key))
return NS_ERROR_FAILURE;
@@ -544,7 +544,7 @@ static PRBool FindProviderFile(nsISupports* aElement, void *aData)
NS_IMETHODIMP
nsDirectoryService::Get(const char* prop, const nsIID & uuid, void* *result)
{
nsStringKey key(prop);
nsCStringKey key(prop);
nsCOMPtr<nsISupports> value = dont_AddRef(mHashtable->Get(&key));
@@ -587,7 +587,7 @@ nsDirectoryService::Get(const char* prop, const nsIID & uuid, void* *result)
NS_IMETHODIMP
nsDirectoryService::Set(const char* prop, nsISupports* value)
{
nsStringKey key(prop);
nsCStringKey key(prop);
if (mHashtable->Exists(&key) || value == nsnull)
return NS_ERROR_FAILURE;