From 49012d867582a90ea2148454862750d4e4117e00 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 1 Jul 2013 01:17:47 +0300 Subject: improve size() usage in actorsprite. --- src/actorsprite.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/actorsprite.cpp') diff --git a/src/actorsprite.cpp b/src/actorsprite.cpp index 09d924070..f22a0f1da 100644 --- a/src/actorsprite.cpp +++ b/src/actorsprite.cpp @@ -405,7 +405,8 @@ void ActorSprite::loadTargetCursor(const std::string &filename, Animation *const anim = new Animation; - for (size_t i = 0; i < currentImageSet->size(); ++i) + const size_t sz = currentImageSet->size(); + for (size_t i = 0; i < sz; ++i) { anim->addFrame(currentImageSet->get(i), 75, (16 - (currentImageSet->getWidth() / 2)), -- cgit v1.2.3-70-g09d2