Fixing warnings.
git-svn-id: svn://10.0.0.236/trunk@45168 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
83f1e9251e
commit
12b9c786ff
@ -120,7 +120,7 @@ nsStringBundle::GetStringFromID(PRInt32 aID, nsString& aResult)
|
||||
{
|
||||
nsAutoString name("");
|
||||
name.Append(aID, 10);
|
||||
nsresult ret = mProps->GetProperty(name, aResult);
|
||||
nsresult ret = mProps->GetStringProperty(name, aResult);
|
||||
|
||||
#ifdef DEBUG_tao
|
||||
char *s = aResult.ToNewCString();
|
||||
@ -135,7 +135,7 @@ nsStringBundle::GetStringFromID(PRInt32 aID, nsString& aResult)
|
||||
nsresult
|
||||
nsStringBundle::GetStringFromName(const nsString& aName, nsString& aResult)
|
||||
{
|
||||
nsresult ret = mProps->GetProperty(aName, aResult);
|
||||
nsresult ret = mProps->GetStringProperty(aName, aResult);
|
||||
#ifdef DEBUG_tao
|
||||
char *s = aResult.ToNewCString(),
|
||||
*ss = aName.ToNewCString();
|
||||
|
||||
@ -96,7 +96,7 @@ nsURLProperties::~nsURLProperties()
|
||||
NS_IMETHODIMP nsURLProperties::Get(const nsString& aKey, nsString& oValue)
|
||||
{
|
||||
if(mDelegate)
|
||||
return mDelegate->GetProperty(aKey, oValue);
|
||||
return mDelegate->GetStringProperty(aKey, oValue);
|
||||
else
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
@ -76,12 +76,12 @@ nsEntityConverter::LoadEntityProperties(nsIPersistentProperties* pEntities)
|
||||
PRInt32 result;
|
||||
|
||||
key="entity.list.name";
|
||||
nsresult rv = pEntities->GetProperty(key,mEntityListName);
|
||||
nsresult rv = pEntities->GetStringProperty(key,mEntityListName);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"nsEntityConverter: malformed entity table\n");
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
key="entity.list.length";
|
||||
rv = pEntities->GetProperty(key,value);
|
||||
rv = pEntities->GetStringProperty(key,value);
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv),"nsEntityConverter: malformed entity table\n");
|
||||
if (NS_FAILED(rv)) return;
|
||||
mEntityListLength = value.ToInteger(&result);
|
||||
@ -96,7 +96,7 @@ nsEntityConverter::LoadEntityProperties(nsIPersistentProperties* pEntities)
|
||||
{
|
||||
key="entity.";
|
||||
key.Append(i,10);
|
||||
rv = pEntities->GetProperty(key,value);
|
||||
rv = pEntities->GetStringProperty(key,value);
|
||||
if (NS_FAILED(rv)) return;
|
||||
|
||||
PRInt32 offset = value.Find(":");
|
||||
|
||||
@ -118,8 +118,8 @@ public:
|
||||
|
||||
// XXX these 2 methods will be subsumed by the ones from
|
||||
// nsIProperties once we figure this all out
|
||||
NS_IMETHOD GetProperty(const nsString& aKey, nsString& aValue) = 0;
|
||||
NS_IMETHOD SetProperty(const nsString& aKey, nsString& aNewValue,
|
||||
NS_IMETHOD GetStringProperty(const nsString& aKey, nsString& aValue) = 0;
|
||||
NS_IMETHOD SetStringProperty(const nsString& aKey, nsString& aNewValue,
|
||||
nsString& aOldValue) = 0;
|
||||
};
|
||||
|
||||
|
||||
@ -269,7 +269,7 @@ nsPersistentProperties::Load(nsIInputStream *aIn)
|
||||
}
|
||||
value.Trim(trimThese, PR_TRUE, PR_TRUE);
|
||||
nsAutoString oldValue("");
|
||||
mSubclass->SetProperty(key, value, oldValue);
|
||||
mSubclass->SetStringProperty(key, value, oldValue);
|
||||
}
|
||||
}
|
||||
mIn->Close();
|
||||
@ -280,7 +280,7 @@ nsPersistentProperties::Load(nsIInputStream *aIn)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPersistentProperties::SetProperty(const nsString& aKey, nsString& aNewValue,
|
||||
nsPersistentProperties::SetStringProperty(const nsString& aKey, nsString& aNewValue,
|
||||
nsString& aOldValue)
|
||||
{
|
||||
// XXX The ToNewCString() calls allocate memory using "new" so this code
|
||||
@ -329,7 +329,7 @@ nsPersistentProperties::Subclass(nsIPersistentProperties* aSubclass)
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsPersistentProperties::GetProperty(const nsString& aKey, nsString& aValue)
|
||||
nsPersistentProperties::GetStringProperty(const nsString& aKey, nsString& aValue)
|
||||
{
|
||||
if (!mTable)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
@ -74,8 +74,8 @@ public:
|
||||
|
||||
// XXX these 2 methods will be subsumed by the ones from
|
||||
// nsIProperties once we figure this all out
|
||||
NS_IMETHOD GetProperty(const nsString& aKey, nsString& aValue);
|
||||
NS_IMETHOD SetProperty(const nsString& aKey, nsString& aNewValue,
|
||||
NS_IMETHOD GetStringProperty(const nsString& aKey, nsString& aValue);
|
||||
NS_IMETHOD SetStringProperty(const nsString& aKey, nsString& aNewValue,
|
||||
nsString& aOldValue);
|
||||
|
||||
// nsPersistentProperties methods:
|
||||
|
||||
@ -170,7 +170,7 @@ main(int argc, char* argv[])
|
||||
name[0] = 0;
|
||||
sprintf(name, "%d", i);
|
||||
nsAutoString v("");
|
||||
ret = props->GetProperty(name, v);
|
||||
ret = props->GetStringProperty(name, v);
|
||||
if (NS_FAILED(ret) || (!v.Length())) {
|
||||
break;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user