summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/animate.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx
index 71028e5b41c5..6896b1736a48 100644
--- a/vcl/source/gdi/animate.cxx
+++ b/vcl/source/gdi/animate.cxx
@@ -326,7 +326,6 @@ void Animation::ImplRestartTimer( sal_uLong nTimeout )
IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer *, void)
{
const size_t nAnimCount = maList.size();
- std::vector< AInfo* > aAInfoList;
if( nAnimCount )
{
@@ -335,14 +334,15 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer *, void)
if( maNotifyLink.IsSet() )
{
+ std::vector< std::unique_ptr<AInfo> > aAInfoList;
// create AInfo-List
for(auto const & i : maViewList)
- aAInfoList.push_back( i->createAInfo() );
+ aAInfoList.emplace_back( i->createAInfo() );
maNotifyLink.Call( this );
// set view state from AInfo structure
- for(AInfo* pAInfo : aAInfoList)
+ for(auto& pAInfo : aAInfoList)
{
if( !pAInfo->pViewData )
{
@@ -358,11 +358,6 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl, Timer *, void)
pView->setMarked( true );
}
- // delete AInfo structures
- for(AInfo* i : aAInfoList)
- delete i;
- aAInfoList.clear();
-
// delete all unmarked views and reset marked state
for( size_t i = 0; i < maViewList.size(); )
{