reduce compiler warnings on Macintosh by adding comparisons in while loops (around assignments)

This commit is contained in:
brade%netscape.com 1999-01-06 20:00:56 +00:00
Родитель 47569bc7f9
Коммит 67027efc9d
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -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);