summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-07-01 01:17:47 +0300
committerAndrei Karas <akaras@inbox.ru>2013-07-01 01:17:47 +0300
commit49012d867582a90ea2148454862750d4e4117e00 (patch)
tree32495618a9972cb403cb4e869a2b70ea4654b055 /src
parent58e36db9bee4e9561416ac9bc86506ae65c8db63 (diff)
downloadplus-49012d867582a90ea2148454862750d4e4117e00.tar.gz
plus-49012d867582a90ea2148454862750d4e4117e00.tar.bz2
plus-49012d867582a90ea2148454862750d4e4117e00.tar.xz
plus-49012d867582a90ea2148454862750d4e4117e00.zip
improve size() usage in actorsprite.
Diffstat (limited to 'src')
-rw-r--r--src/actorsprite.cpp3
1 files changed, 2 insertions, 1 deletions
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)),