Bug 629289 - forcing value to bool (performance warning C4800), r=davidb, a=davidb

This commit is contained in:
Alexander Surkov 2011-01-28 12:38:02 +08:00
parent 1809bf8e46
commit 5b9ca5d7f0
2 changed files with 6 additions and 6 deletions

View File

@ -3203,16 +3203,16 @@ nsAccessible::TestChildCache(nsAccessible* aCachedChild) const
}
// nsAccessible public
PRBool
bool
nsAccessible::EnsureChildren()
{
if (IsDefunct()) {
mChildrenFlags = eChildrenUninitialized;
return PR_TRUE;
return true;
}
if (mChildrenFlags != eChildrenUninitialized)
return PR_FALSE;
return false;
// State is embedded children until text leaf accessible is appended.
mChildrenFlags = eEmbeddedChildren; // Prevent reentry
@ -3227,7 +3227,7 @@ nsAccessible::EnsureChildren()
if (document)
document->NotifyOfCachingEnd(this);
return PR_FALSE;
return false;
}
nsAccessible*

View File

@ -237,7 +237,7 @@ public:
/**
* Cache children if necessary. Return true if the accessible is defunct.
*/
PRBool EnsureChildren();
bool EnsureChildren();
/**
* Set the child count to -1 (unknown) and null out cached child pointers.
@ -319,7 +319,7 @@ public:
PRUint32 GetCachedChildCount() const { return mChildren.Length(); }
nsAccessible* GetCachedChildAt(PRUint32 aIndex) const { return mChildren.ElementAt(aIndex); }
PRBool AreChildrenCached() const { return mChildrenFlags != eChildrenUninitialized; }
bool IsBoundToParent() const { return mParent; }
bool IsBoundToParent() const { return !!mParent; }
//////////////////////////////////////////////////////////////////////////////
// Miscellaneous methods