Add AppendObjects/InsertObjectsAt to nsCOMArray. Bug 175137,
r=timeless, sr=alecf, a=dbaron git-svn-id: svn://10.0.0.236/trunk@132489 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -66,6 +66,19 @@ nsCOMArray_base::InsertObjectAt(nsISupports* aObject, PRInt32 aIndex) {
|
||||
return result;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsCOMArray_base::InsertObjectsAt(const nsCOMArray_base& aObjects, PRInt32 aIndex) {
|
||||
PRBool result = mArray.InsertElementsAt(aObjects.mArray, aIndex);
|
||||
if (result) {
|
||||
// need to addref all these
|
||||
PRInt32 count = aObjects.Count();
|
||||
for (PRInt32 i = 0; i < count; ++i) {
|
||||
NS_IF_ADDREF(aObjects.ObjectAt(i));
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsCOMArray_base::ReplaceObjectAt(nsISupports* aObject, PRInt32 aIndex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user