nsSupportsArray::RemoveElement(const nsISupports* aElement, PRUint32 aStartIndex)
{
  PRInt32 theIndex = IndexOfStartingAt(aElement,aStartIndex);
  if (theIndex >= 0)
    return RemoveElementAt(theIndex);

  return PR_FALSE;
}
Beispiel #2
0
nsSupportsArray::RemoveElement(const nsISupports* aElement, uint32_t aStartIndex)
{
  int32_t theIndex = IndexOfStartingAt(aElement,aStartIndex);
  if (theIndex >= 0)
    return RemoveElementAt(theIndex);

  return false;
}
NS_IMETHODIMP
nsSupportsArray::RemoveElement(nsISupports* aElement)
{
  int32_t theIndex = IndexOfStartingAt(aElement, 0);
  if (theIndex >= 0) {
    return RemoveElementAt(theIndex) ? NS_OK : NS_ERROR_FAILURE;
  }

  return NS_ERROR_FAILURE;
}
nsSupportsArray::IndexOf(const nsISupports* aPossibleElement)
{
  return IndexOfStartingAt(aPossibleElement, 0);
}