From af1b482dc77fcdc75fa1eeaf82be580c741f43b1 Mon Sep 17 00:00:00 2001 From: "brade%netscape.com" Date: Mon, 30 Jun 2003 14:41:55 +0000 Subject: [PATCH] code cleanup; r=timeless, sr=kin, bug=209548 git-svn-id: svn://10.0.0.236/trunk@144268 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/editor/libeditor/base/JoinElementTxn.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/mozilla/editor/libeditor/base/JoinElementTxn.cpp b/mozilla/editor/libeditor/base/JoinElementTxn.cpp index c72af9c87b9..e00c3ed569e 100644 --- a/mozilla/editor/libeditor/base/JoinElementTxn.cpp +++ b/mozilla/editor/libeditor/base/JoinElementTxn.cpp @@ -93,8 +93,7 @@ NS_IMETHODIMP JoinElementTxn::DoTransaction(void) { mParent= do_QueryInterface(leftParent); // set this instance mParent. // Other methods will see a non-null mParent and know all is well - nsCOMPtr leftNodeAsText; - leftNodeAsText = do_QueryInterface(mLeftNode); + nsCOMPtr leftNodeAsText = do_QueryInterface(mLeftNode); if (leftNodeAsText) { leftNodeAsText->GetLength(&mOffset); @@ -138,8 +137,7 @@ NS_IMETHODIMP JoinElementTxn::UndoTransaction(void) nsresult result; nsCOMPtrresultNode; // first, massage the existing node so it is in its post-split state - nsCOMPtrrightNodeAsText; - rightNodeAsText = do_QueryInterface(mRightNode); + nsCOMPtrrightNodeAsText = do_QueryInterface(mRightNode); if (rightNodeAsText) { result = rightNodeAsText->DeleteData(0, mOffset); @@ -147,8 +145,8 @@ NS_IMETHODIMP JoinElementTxn::UndoTransaction(void) else { nsCOMPtrchild; - nsCOMPtrnextSibling; result = mRightNode->GetFirstChild(getter_AddRefs(child)); + nsCOMPtrnextSibling; PRUint32 i; for (i=0; i