Bug 510024. Remove unnecessary casts in nsAccessibleWrap.mm. r=davidb

The type of currAcc.get() is already nsIAccessible* so there is no need for a
further cast to nsIAccessible*
This commit is contained in:
Jeff Muizelaar 2009-08-12 14:54:54 -04:00
parent 6988348311
commit d0084bddf1

View File

@ -238,7 +238,7 @@ nsAccessibleWrap::GetUnignoredChildCount(PRBool aDeepCount)
nsCOMPtr<nsIAccessible> curAcc;
while (NextChild(curAcc)) {
nsAccessibleWrap *childWrap = static_cast<nsAccessibleWrap*>((nsIAccessible*)curAcc.get());
nsAccessibleWrap *childWrap = static_cast<nsAccessibleWrap*>(curAcc.get());
// if the current child is not ignored, count it.
if (!childWrap->IsIgnored())
@ -280,7 +280,7 @@ nsAccessibleWrap::GetUnignoredChildren(nsTArray<nsRefPtr<nsAccessibleWrap> > &aC
return;
while (NextChild(curAcc)) {
nsAccessibleWrap *childWrap = static_cast<nsAccessibleWrap*>((nsIAccessible*)curAcc.get());
nsAccessibleWrap *childWrap = static_cast<nsAccessibleWrap*>(curAcc.get());
if (childWrap->IsIgnored()) {
// element is ignored, so try adding its children as substitutes, if it has any.
if (!nsAccUtils::MustPrune(childWrap)) {
@ -301,7 +301,7 @@ already_AddRefed<nsIAccessible>
nsAccessibleWrap::GetUnignoredParent()
{
nsCOMPtr<nsIAccessible> parent(GetParent());
nsAccessibleWrap *parentWrap = static_cast<nsAccessibleWrap*>((nsIAccessible*)parent.get());
nsAccessibleWrap *parentWrap = static_cast<nsAccessibleWrap*>(parent.get());
if (!parentWrap)
return nsnull;