summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svddrgmt.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-28 15:13:42 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-29 07:17:37 +0100
commit21de55596c0fdc2be736c6d0369bd9d3783020be (patch)
tree07d0f0cd54690e54405fe574c572cb2be74a3336 /svx/source/svdraw/svddrgmt.cxx
parentda9fb5d6d9ebf9363981c370ce937d8848989fcb (diff)
remove unnecessary "if (!empty()" checks before loops
found with git grep -n -A4 'if.*!.*empty' | grep -B3 -P '(\bfor)|(\bwhile)|(\bdo)' Change-Id: I582235b7cf977a0f9fb4099eb306fdb4a07b5334 Reviewed-on: https://gerrit.libreoffice.org/64169 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/svdraw/svddrgmt.cxx')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx33
1 files changed, 15 insertions, 18 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 13ee857e655f..4fd4a177fc2b 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -730,32 +730,29 @@ void SdrDragMethod::CreateOverlayGeometry(
}
// #i54102# if there are edges, reconnect their ends to the corresponding clones (if found)
- if(!aEdges.empty())
+ for(SdrEdgeObj* pSdrEdgeObj: aEdges)
{
- for(SdrEdgeObj* pSdrEdgeObj: aEdges)
+ SdrObject* pConnectedTo = pSdrEdgeObj->GetConnectedNode(true);
+
+ if(pConnectedTo)
{
- SdrObject* pConnectedTo = pSdrEdgeObj->GetConnectedNode(true);
+ SdrObjectAndCloneMap::iterator aEntry = aOriginalAndClones.find(pConnectedTo);
- if(pConnectedTo)
+ if(aEntry != aOriginalAndClones.end())
{
- SdrObjectAndCloneMap::iterator aEntry = aOriginalAndClones.find(pConnectedTo);
-
- if(aEntry != aOriginalAndClones.end())
- {
- pSdrEdgeObj->ConnectToNode(true, aEntry->second);
- }
+ pSdrEdgeObj->ConnectToNode(true, aEntry->second);
}
+ }
- pConnectedTo = pSdrEdgeObj->GetConnectedNode(false);
+ pConnectedTo = pSdrEdgeObj->GetConnectedNode(false);
- if(pConnectedTo)
- {
- SdrObjectAndCloneMap::iterator aEntry = aOriginalAndClones.find(pConnectedTo);
+ if(pConnectedTo)
+ {
+ SdrObjectAndCloneMap::iterator aEntry = aOriginalAndClones.find(pConnectedTo);
- if(aEntry != aOriginalAndClones.end())
- {
- pSdrEdgeObj->ConnectToNode(false, aEntry->second);
- }
+ if(aEntry != aOriginalAndClones.end())
+ {
+ pSdrEdgeObj->ConnectToNode(false, aEntry->second);
}
}
}