Kaydet (Commit) 52db5038 authored tarafından Joren De Cuyper's avatar Joren De Cuyper Kaydeden (comit) Muthu Subramanian K

Delete double condition check

We don't need to check if aNextPostIt != aVisiblePostItList.end()
again because we only can enter the enclosing if-statement when
aNextPostIt != aVisiblePostItList.end()

Change-Id: I853ed465e957bd26dae8312d2ce717ea1ca0b4e8
Reviewed-on: https://gerrit.libreoffice.org/2453Reviewed-by: 's avatarMuthu Subramanian K <muthusuba@gmail.com>
Tested-by: 's avatarMuthu Subramanian K <muthusuba@gmail.com>
üst b2cc8263
...@@ -968,7 +968,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons ...@@ -968,7 +968,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
SwSidebarWin_iterator aNextPostIt = i; SwSidebarWin_iterator aNextPostIt = i;
++aNextPostIt; ++aNextPostIt;
if (aNextPostIt !=aVisiblePostItList.end()) if (aNextPostIt != aVisiblePostItList.end())
{ {
lTranslatePos = ( (*i)->VirtualPos().Y() + (*i)->VirtualSize().Height()) - (*aNextPostIt)->VirtualPos().Y(); lTranslatePos = ( (*i)->VirtualPos().Y() + (*i)->VirtualSize().Height()) - (*aNextPostIt)->VirtualPos().Y();
if (lTranslatePos > 0) // note windows overlaps the next one if (lTranslatePos > 0) // note windows overlaps the next one
...@@ -1020,7 +1020,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons ...@@ -1020,7 +1020,7 @@ bool SwPostItMgr::LayoutByPage(std::list<SwSidebarWin*> &aVisiblePostItList,cons
} }
} }
} }
if (aNextPostIt !=aVisiblePostItList.end() && (*aNextPostIt)->IsFollow()) if ( (*aNextPostIt)->IsFollow() )
lSpaceUsed += (*i)->VirtualSize().Height() + ANCHORLINE_WIDTH; lSpaceUsed += (*i)->VirtualSize().Height() + ANCHORLINE_WIDTH;
else else
lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween(); lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment