From a51e000a16df86017c3ea5cb47c680679878c971 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Thu, 16 Jan 2003 19:44:21 +0000 Subject: [PATCH] eliminate some build warnings. See bug 187117. git-svn-id: svn://10.0.0.236/trunk@136426 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsSplittableFrame.cpp | 16 ++++++---------- mozilla/layout/generic/nsTextFrame.cpp | 16 ++++++---------- .../layout/html/base/src/nsSplittableFrame.cpp | 16 ++++++---------- mozilla/layout/html/base/src/nsTextFrame.cpp | 16 ++++++---------- 4 files changed, 24 insertions(+), 40 deletions(-) diff --git a/mozilla/layout/generic/nsSplittableFrame.cpp b/mozilla/layout/generic/nsSplittableFrame.cpp index 19a8a63b790..abf0864dc48 100644 --- a/mozilla/layout/generic/nsSplittableFrame.cpp +++ b/mozilla/layout/generic/nsSplittableFrame.cpp @@ -105,11 +105,9 @@ NS_METHOD nsSplittableFrame::SetNextInFlow(nsIFrame* aFrame) nsIFrame* nsSplittableFrame::GetFirstInFlow() const { - nsSplittableFrame* firstInFlow; - nsSplittableFrame* prevInFlow = (nsSplittableFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; + nsSplittableFrame* firstInFlow = (nsSplittableFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -117,11 +115,9 @@ nsIFrame* nsSplittableFrame::GetFirstInFlow() const nsIFrame* nsSplittableFrame::GetLastInFlow() const { - nsSplittableFrame* lastInFlow; - nsSplittableFrame* nextInFlow = (nsSplittableFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; + nsSplittableFrame* lastInFlow = (nsSplittableFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow; diff --git a/mozilla/layout/generic/nsTextFrame.cpp b/mozilla/layout/generic/nsTextFrame.cpp index dd8dc39512b..56582bfc881 100644 --- a/mozilla/layout/generic/nsTextFrame.cpp +++ b/mozilla/layout/generic/nsTextFrame.cpp @@ -966,11 +966,9 @@ nsContinuingTextFrame::Destroy(nsIPresContext* aPresContext) nsIFrame* nsContinuingTextFrame::GetFirstInFlow() const { - nsContinuingTextFrame* firstInFlow; - nsContinuingTextFrame* prevInFlow = (nsContinuingTextFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; + nsContinuingTextFrame* firstInFlow = (nsContinuingTextFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -1445,11 +1443,9 @@ nsTextFrame::GetCursor(nsIPresContext* aPresContext, nsIFrame* nsTextFrame::GetLastInFlow() const { - nsTextFrame* lastInFlow; - nsTextFrame* nextInFlow = (nsTextFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; + nsTextFrame* lastInFlow = (nsTextFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow; diff --git a/mozilla/layout/html/base/src/nsSplittableFrame.cpp b/mozilla/layout/html/base/src/nsSplittableFrame.cpp index 19a8a63b790..abf0864dc48 100644 --- a/mozilla/layout/html/base/src/nsSplittableFrame.cpp +++ b/mozilla/layout/html/base/src/nsSplittableFrame.cpp @@ -105,11 +105,9 @@ NS_METHOD nsSplittableFrame::SetNextInFlow(nsIFrame* aFrame) nsIFrame* nsSplittableFrame::GetFirstInFlow() const { - nsSplittableFrame* firstInFlow; - nsSplittableFrame* prevInFlow = (nsSplittableFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; + nsSplittableFrame* firstInFlow = (nsSplittableFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsSplittableFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -117,11 +115,9 @@ nsIFrame* nsSplittableFrame::GetFirstInFlow() const nsIFrame* nsSplittableFrame::GetLastInFlow() const { - nsSplittableFrame* lastInFlow; - nsSplittableFrame* nextInFlow = (nsSplittableFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; + nsSplittableFrame* lastInFlow = (nsSplittableFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsSplittableFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow; diff --git a/mozilla/layout/html/base/src/nsTextFrame.cpp b/mozilla/layout/html/base/src/nsTextFrame.cpp index dd8dc39512b..56582bfc881 100644 --- a/mozilla/layout/html/base/src/nsTextFrame.cpp +++ b/mozilla/layout/html/base/src/nsTextFrame.cpp @@ -966,11 +966,9 @@ nsContinuingTextFrame::Destroy(nsIPresContext* aPresContext) nsIFrame* nsContinuingTextFrame::GetFirstInFlow() const { - nsContinuingTextFrame* firstInFlow; - nsContinuingTextFrame* prevInFlow = (nsContinuingTextFrame*)this; - while (prevInFlow) { - firstInFlow = prevInFlow; - prevInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; + nsContinuingTextFrame* firstInFlow = (nsContinuingTextFrame*)this; + while (firstInFlow->mPrevInFlow) { + firstInFlow = (nsContinuingTextFrame*)firstInFlow->mPrevInFlow; } NS_POSTCONDITION(firstInFlow, "illegal state in flow chain."); return firstInFlow; @@ -1445,11 +1443,9 @@ nsTextFrame::GetCursor(nsIPresContext* aPresContext, nsIFrame* nsTextFrame::GetLastInFlow() const { - nsTextFrame* lastInFlow; - nsTextFrame* nextInFlow = (nsTextFrame*)this; - while (nextInFlow) { - lastInFlow = nextInFlow; - nextInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; + nsTextFrame* lastInFlow = (nsTextFrame*)this; + while (lastInFlow->mNextInFlow) { + lastInFlow = (nsTextFrame*)lastInFlow->mNextInFlow; } NS_POSTCONDITION(lastInFlow, "illegal state in flow chain."); return lastInFlow;