summaryrefslogtreecommitdiff
path: root/src/actorsprite.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/actorsprite.cpp')
-rw-r--r--src/actorsprite.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp
index 088bc9f4..90176dcd 100644
--- a/src/actorsprite.cpp
+++ b/src/actorsprite.cpp
@@ -437,16 +437,16 @@ void ActorSprite::loadTargetCursor(const std::string &filename,
return;
}
- auto *anim = new Animation;
+ Animation anim;
for (unsigned int i = 0; i < currentImageSet->size(); ++i)
{
- anim->addFrame(currentImageSet->get(i), DEFAULT_FRAME_DELAY,
+ anim.addFrame(currentImageSet->get(i), DEFAULT_FRAME_DELAY,
-(currentImageSet->getWidth() / 2),
-(currentImageSet->getHeight() / 2));
}
- auto *currentCursor = new SimpleAnimation(anim);
+ auto *currentCursor = new SimpleAnimation(std::move(anim));
targetCursorImages[type][size] = currentImageSet;
targetCursor[type][size] = currentCursor;