API cleanup for nsString

git-svn-id: svn://10.0.0.236/trunk@26288 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rickg%netscape.com
1999-04-05 08:06:54 +00:00
parent b80026e24a
commit 15e7886623
4 changed files with 6 additions and 6 deletions

View File

@@ -466,7 +466,7 @@ nsFileURL::nsFileURL(const nsString& inString, PRBool inCreateDirs)
{
const nsAutoCString aString(inString);
const char* aCString = (const char*) aString;
if (!inString)
if (!inString.Length())
return;
NS_ASSERTION(strstr(aCString, kFileURLPrefix) == aCString, "Not a URL!");
// Make canonical and absolute.

View File

@@ -177,7 +177,7 @@ nsProperties::SetProperty(const nsString& aKey, nsString& aNewValue,
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);
PLHashEntry *he = *hep;
if (he && aOldValue) {
if (he && aOldValue.Length()) {
// XXX fix me
}
PL_HashTableRawAdd(mTable, hep, hashValue, aKey.ToNewUnicode(),
@@ -205,7 +205,7 @@ nsProperties::Subclass(nsIProperties* aSubclass)
NS_IMETHODIMP
nsProperties::GetProperty(const nsString& aKey, nsString& aValue)
{
const PRUnichar *key = aKey;
const PRUnichar *key = aKey.GetUnicode();
PRUint32 len;
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);

View File

@@ -177,7 +177,7 @@ nsProperties::SetProperty(const nsString& aKey, nsString& aNewValue,
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);
PLHashEntry *he = *hep;
if (he && aOldValue) {
if (he && aOldValue.Length()) {
// XXX fix me
}
PL_HashTableRawAdd(mTable, hep, hashValue, aKey.ToNewUnicode(),
@@ -205,7 +205,7 @@ nsProperties::Subclass(nsIProperties* aSubclass)
NS_IMETHODIMP
nsProperties::GetProperty(const nsString& aKey, nsString& aValue)
{
const PRUnichar *key = aKey;
const PRUnichar *key = aKey.GetUnicode();
PRUint32 len;
PRUint32 hashValue = nsCRT::HashValue(key, &len);
PLHashEntry **hep = PL_HashTableRawLookup(mTable, hashValue, key);

View File

@@ -466,7 +466,7 @@ nsFileURL::nsFileURL(const nsString& inString, PRBool inCreateDirs)
{
const nsAutoCString aString(inString);
const char* aCString = (const char*) aString;
if (!inString)
if (!inString.Length())
return;
NS_ASSERTION(strstr(aCString, kFileURLPrefix) == aCString, "Not a URL!");
// Make canonical and absolute.