[PATCH] Delete double condition check
Joren De Cuyper (via Code Review)
gerrit at gerrit.libreoffice.org
Wed Feb 27 15:48:42 PST 2013
Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2453
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/53/2453/1
Delete double condition check
We don't need to check if aNextPostIt != aVisiblePostItList.end()
because we can't enter the enclosing if-statement when
aNextPostIt != aVisiblePostItList.end()
Change-Id: I853ed465e957bd26dae8312d2ce717ea1ca0b4e8
---
M sw/source/ui/docvw/PostItMgr.cxx
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sw/source/ui/docvw/PostItMgr.cxx b/sw/source/ui/docvw/PostItMgr.cxx
index 8d7148c..4dc6ab4 100644
--- a/sw/source/ui/docvw/PostItMgr.cxx
+++ b/sw/source/ui/docvw/PostItMgr.cxx
@@ -968,7 +968,7 @@
SwSidebarWin_iterator aNextPostIt = i;
++aNextPostIt;
- if (aNextPostIt !=aVisiblePostItList.end())
+ if (aNextPostIt != aVisiblePostItList.end())
{
lTranslatePos = ( (*i)->VirtualPos().Y() + (*i)->VirtualSize().Height()) - (*aNextPostIt)->VirtualPos().Y();
if (lTranslatePos > 0) // note windows overlaps the next one
@@ -1020,7 +1020,7 @@
}
}
}
- if (aNextPostIt !=aVisiblePostItList.end() && (*aNextPostIt)->IsFollow())
+ if ( (*aNextPostIt)->IsFollow() )
lSpaceUsed += (*i)->VirtualSize().Height() + ANCHORLINE_WIDTH;
else
lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween();
--
To view, visit https://gerrit.libreoffice.org/2453
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I853ed465e957bd26dae8312d2ce717ea1ca0b4e8
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Joren De Cuyper <joren.libreoffice at telenet.be>
More information about the LibreOffice
mailing list