summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2014-08-31 19:56:38 +0200
committerMatteo Casalin <matteo.casalin@yahoo.com>2014-09-06 12:12:29 +0200
commitbdf00bafb4bf6d5cc135c28c78cc740543eca309 (patch)
treece0bf342a2930be193288ee80e9368a93333738d
parent55e866c5c1018b28a55bd8383677de61fe582a90 (diff)
Simplify by early bailout
Change-Id: Id6697760f6037f3a11d5b72d1727e48fb3ec6b56
-rw-r--r--sw/source/core/text/noteurl.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/text/noteurl.cxx b/sw/source/core/text/noteurl.cxx
index 36fb723c39f3..b70191d107c0 100644
--- a/sw/source/core/text/noteurl.cxx
+++ b/sw/source/core/text/noteurl.cxx
@@ -34,12 +34,10 @@ void SwNoteURL::InsertURLNote( const OUString& rURL, const OUString& rTarget,
sal_uInt16 nCount = aList.size();
for( i = 0; i < nCount; i++ )
if( rRect == aList[i].GetRect() )
- break;
- if( i == nCount )
- {
- SwURLNote *pNew = new SwURLNote( rURL, rTarget, rRect );
- aList.push_back( pNew );
- }
+ return;
+
+ SwURLNote *pNew = new SwURLNote( rURL, rTarget, rRect );
+ aList.push_back( pNew );
}
void SwNoteURL::FillImageMap( ImageMap *pMap, const Point &rPos,