mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Clean up nsICollection/nsSupportsArray {Append,Remove}Element return type (130544, r=dougt, sr=bienvenu).
This commit is contained in:
parent
2fbaa70225
commit
d133d09cb4
File diff suppressed because it is too large
Load Diff
@ -48,8 +48,8 @@ interface nsICollection : nsISerializable
|
||||
void QueryElementAt(in PRUint32 index, in nsIIDRef uuid,
|
||||
[iid_is(uuid),retval] out nsQIResult result);
|
||||
void SetElementAt(in PRUint32 index, in nsISupports item);
|
||||
void AppendElement(in nsISupports item);
|
||||
void RemoveElement(in nsISupports item);
|
||||
[notxpcom] boolean AppendElement(in nsISupports item);
|
||||
[notxpcom] boolean RemoveElement(in nsISupports item);
|
||||
|
||||
nsIEnumerator Enumerate();
|
||||
|
||||
|
@ -73,12 +73,12 @@ public:
|
||||
NS_IMETHOD SetElementAt(PRUint32 aIndex, nsISupports* value) {
|
||||
return ReplaceElementAt(value, aIndex) ? NS_OK : NS_ERROR_FAILURE;
|
||||
}
|
||||
NS_IMETHOD AppendElement(nsISupports *aElement) {
|
||||
return InsertElementAt(aElement, mCount)/* ? NS_OK : NS_ERROR_FAILURE*/;
|
||||
NS_IMETHOD_(PRBool) AppendElement(nsISupports *aElement) {
|
||||
return InsertElementAt(aElement, mCount);
|
||||
}
|
||||
// XXX this is badly named - should be RemoveFirstElement
|
||||
NS_IMETHOD RemoveElement(nsISupports *aElement) {
|
||||
return RemoveElement(aElement, 0)/* ? NS_OK : NS_ERROR_FAILURE*/;
|
||||
// NB: This may seem silly, but it implements nsICollection::RemoveElement.
|
||||
NS_IMETHOD_(PRBool) RemoveElement(nsISupports *aElement) {
|
||||
return RemoveElement(aElement, 0);
|
||||
}
|
||||
NS_IMETHOD_(PRBool) MoveElement(PRInt32 aFrom, PRInt32 aTo);
|
||||
NS_IMETHOD Enumerate(nsIEnumerator* *result);
|
||||
|
Loading…
Reference in New Issue
Block a user