diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-27 14:49:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-10-28 07:08:47 +0000 |
commit | 89687d651eabcf64816c1b25defe38c7b68dd468 (patch) | |
tree | aa7e6f0848424d408a992815feab4f3e6ee6495d /sd/source/ui/tools/TimerBasedTaskExecution.cxx | |
parent | loplugin:expandablemethods in scaddins..scripting (diff) | |
download | core-89687d651eabcf64816c1b25defe38c7b68dd468.tar.gz core-89687d651eabcf64816c1b25defe38c7b68dd468.zip |
loplugin:expandablemethods in sd
Change-Id: I87a537928bdf42285448bba7cb50c497f2637c3c
Reviewed-on: https://gerrit.libreoffice.org/30330
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/tools/TimerBasedTaskExecution.cxx')
-rw-r--r-- | sd/source/ui/tools/TimerBasedTaskExecution.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx index 8d99a259a7e3..f61823b31d6a 100644 --- a/sd/source/ui/tools/TimerBasedTaskExecution.cxx +++ b/sd/source/ui/tools/TimerBasedTaskExecution.cxx @@ -48,7 +48,8 @@ std::shared_ptr<TimerBasedTaskExecution> TimerBasedTaskExecution::Create ( // Let the new object have a shared_ptr to itself, so that it can // release itself when the AsynchronousTask has been executed // completely. - pExecution->SetSelf(pExecution); + if (pExecution->mpTask.get() != nullptr) + pExecution->mpSelf = pExecution; return pExecution; } @@ -99,13 +100,6 @@ TimerBasedTaskExecution::~TimerBasedTaskExecution() maTimer.Stop(); } -void TimerBasedTaskExecution::SetSelf ( - const std::shared_ptr<TimerBasedTaskExecution>& rpSelf) -{ - if (mpTask.get() != nullptr) - mpSelf = rpSelf; -} - IMPL_LINK_NOARG(TimerBasedTaskExecution, TimerCallback, Timer *, void) { if (mpTask.get() != nullptr) |