API cleanup for nsString
git-svn-id: svn://10.0.0.236/trunk@26288 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user