mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-01 19:39:13 +00:00
reduce compiler warnings on Macintosh by adding comparisons in while loops (around assignments)
This commit is contained in:
parent
91a6767a69
commit
08f3275254
@ -633,7 +633,7 @@ nsresult nsRange::PopRanges(nsIDOMNode* aDestNode, PRInt32 aOffset, nsIContent*
|
||||
{
|
||||
nsRange* theRange;
|
||||
PRInt32 loop = 0;
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
nsIDOMNode *domNode;
|
||||
res = GetDOMNodeFromContent(cN, &domNode);
|
||||
@ -1375,7 +1375,7 @@ nsresult nsRange::OwnerChildInserted(nsIContent* aParentNode, PRInt32 aOffset)
|
||||
if (NS_SUCCEEDED(res)) return res;
|
||||
if (!domNode) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
// sanity check - do range and content agree over ownership?
|
||||
res = theRange->ContentOwnsUs(domNode);
|
||||
@ -1421,7 +1421,7 @@ nsresult nsRange::OwnerChildRemoved(nsIContent* aParentNode, PRInt32 aOffset, ns
|
||||
if (!domNode) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// any ranges that are in the parentNode may need to have offsets updated
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
// sanity check - do range and content agree over ownership?
|
||||
res = theRange->ContentOwnsUs(domNode);
|
||||
@ -1496,7 +1496,7 @@ nsresult nsRange::TextOwnerChanged(nsIContent* aTextNode, PRInt32 aStartChanged,
|
||||
if (!domNode) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// any ranges that are in the textNode may need to have offsets updated
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
// sanity check - do range and content agree over ownership?
|
||||
res = theRange->ContentOwnsUs(domNode);
|
||||
|
@ -633,7 +633,7 @@ nsresult nsRange::PopRanges(nsIDOMNode* aDestNode, PRInt32 aOffset, nsIContent*
|
||||
{
|
||||
nsRange* theRange;
|
||||
PRInt32 loop = 0;
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
nsIDOMNode *domNode;
|
||||
res = GetDOMNodeFromContent(cN, &domNode);
|
||||
@ -1375,7 +1375,7 @@ nsresult nsRange::OwnerChildInserted(nsIContent* aParentNode, PRInt32 aOffset)
|
||||
if (NS_SUCCEEDED(res)) return res;
|
||||
if (!domNode) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
// sanity check - do range and content agree over ownership?
|
||||
res = theRange->ContentOwnsUs(domNode);
|
||||
@ -1421,7 +1421,7 @@ nsresult nsRange::OwnerChildRemoved(nsIContent* aParentNode, PRInt32 aOffset, ns
|
||||
if (!domNode) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// any ranges that are in the parentNode may need to have offsets updated
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
// sanity check - do range and content agree over ownership?
|
||||
res = theRange->ContentOwnsUs(domNode);
|
||||
@ -1496,7 +1496,7 @@ nsresult nsRange::TextOwnerChanged(nsIContent* aTextNode, PRInt32 aStartChanged,
|
||||
if (!domNode) return NS_ERROR_UNEXPECTED;
|
||||
|
||||
// any ranges that are in the textNode may need to have offsets updated
|
||||
while (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop))))
|
||||
while (NULL != (theRange = NS_STATIC_CAST(nsRange*, (theRangeList->ElementAt(loop)))))
|
||||
{
|
||||
// sanity check - do range and content agree over ownership?
|
||||
res = theRange->ContentOwnsUs(domNode);
|
||||
|
Loading…
x
Reference in New Issue
Block a user