summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--svl/source/svdde/ddesvr.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/svl/source/svdde/ddesvr.cxx b/svl/source/svdde/ddesvr.cxx
index 1848342b893b..b9b6bcce4660 100644
--- a/svl/source/svdde/ddesvr.cxx
+++ b/svl/source/svdde/ddesvr.cxx
@@ -577,11 +577,8 @@ DdeItem* DdeTopic::AddItem( const DdeItem& r )
else
s = new DdeItem( r );
- if ( s )
- {
- aItems.push_back( s );
- s->pMyTopic = this;
- }
+ aItems.push_back( s );
+ s->pMyTopic = this;
return s;
}
@@ -770,9 +767,9 @@ short DdeItem::GetLinks()
short nCnt = 0;
if( pImpData )
{
- for( sal_uInt16 n = pImpData->size(); n; )
+ for (const auto& rData : *pImpData)
{
- nCnt = nCnt + (*pImpData)[ --n ].nCnt;
+ nCnt += rData.nCnt;
}
}
return nCnt;