summaryrefslogtreecommitdiff
path: root/src/imageparticle.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-30 22:53:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-30 22:53:27 +0300
commit5cbd0d2cb7086fda592c00dbc3b07d06af95f080 (patch)
treed36b4ac344f31f34311c7cb7a9a637ed48356e3e /src/imageparticle.cpp
parent4210163dae7d6266923ab11f78b631173c9533e3 (diff)
downloadplus-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.gz
plus-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.bz2
plus-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.tar.xz
plus-5cbd0d2cb7086fda592c00dbc3b07d06af95f080.zip
Add const to more classes.
Diffstat (limited to 'src/imageparticle.cpp')
-rw-r--r--src/imageparticle.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp
index 5e0b93d7a..863cb8ba8 100644
--- a/src/imageparticle.cpp
+++ b/src/imageparticle.cpp
@@ -30,7 +30,7 @@
std::map<std::string, int> ImageParticle::imageParticleCountByName;
-ImageParticle::ImageParticle(Map *map, Image *image):
+ImageParticle::ImageParticle(Map *const map, Image *const image):
Particle(map),
mImage(image)
{
@@ -70,8 +70,9 @@ bool ImageParticle::draw(Graphics *graphics, int offsetX, int offsetY) const
if (!isAlive() || !mImage)
return false;
- int screenX = static_cast<int>(mPos.x) + offsetX - mImage->mBounds.w / 2;
- int screenY = static_cast<int>(mPos.y) - static_cast<int>(mPos.z)
+ const int screenX = static_cast<int>(mPos.x)
+ + offsetX - mImage->mBounds.w / 2;
+ const int screenY = static_cast<int>(mPos.y) - static_cast<int>(mPos.z)
+ offsetY - mImage->mBounds.h / 2;
// Check if on screen