mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 777292 - Cast NS_ENUMERATOR_FALSE to nsresult and complain in comments; r=ehsan
This commit is contained in:
parent
96fc9d649c
commit
7644f69a87
@ -431,7 +431,9 @@ nsSelectionIterator::IsDone()
|
||||
{
|
||||
PRInt32 cnt = mDomSelection->mRanges.Length();
|
||||
if (mIndex >= 0 && mIndex < cnt) {
|
||||
return NS_ENUMERATOR_FALSE;
|
||||
// XXX This is completely incompatible with the meaning of nsresult.
|
||||
// NS_ENUMERATOR_FALSE is defined to be 1. (bug 778111)
|
||||
return (nsresult)NS_ENUMERATOR_FALSE;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -69,8 +69,10 @@ nsSupportsArrayEnumerator::IsDone()
|
||||
PRUint32 cnt;
|
||||
nsresult rv = mArray->Count(&cnt);
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
// XXX This is completely incompatible with the meaning of nsresult.
|
||||
// NS_ENUMERATOR_FALSE is defined to be 1. (bug 778111)
|
||||
return (mCursor >= 0 && mCursor < (PRInt32)cnt)
|
||||
? NS_ENUMERATOR_FALSE : NS_OK;
|
||||
? (nsresult)NS_ENUMERATOR_FALSE : NS_OK;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
Reference in New Issue
Block a user