diff options
Diffstat (limited to 'src/gui/widgets/progressindicator.cpp')
-rw-r--r-- | src/gui/widgets/progressindicator.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/gui/widgets/progressindicator.cpp b/src/gui/widgets/progressindicator.cpp index 40523e9a..37aaab62 100644 --- a/src/gui/widgets/progressindicator.cpp +++ b/src/gui/widgets/progressindicator.cpp @@ -35,19 +35,16 @@ ProgressIndicator::ProgressIndicator() ImageSet *images = Theme::getImageSetFromTheme("progress-indicator.png", 32, 32); - auto *anim = new Animation; + Animation anim; for (size_t i = 0; i < images->size(); ++i) - anim->addFrame(images->get(i), 100, 0, 0); + anim.addFrame(images->get(i), 100, 0, 0); - mIndicator = new SimpleAnimation(anim); + mIndicator = std::make_unique<SimpleAnimation>(std::move(anim)); setSize(32, 32); } -ProgressIndicator::~ProgressIndicator() -{ - delete mIndicator; -} +ProgressIndicator::~ProgressIndicator() = default; void ProgressIndicator::logic() { |