From 5cbd0d2cb7086fda592c00dbc3b07d06af95f080 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Aug 2012 22:53:27 +0300 Subject: Add const to more classes. --- src/imageparticle.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/imageparticle.cpp') 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 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(mPos.x) + offsetX - mImage->mBounds.w / 2; - int screenY = static_cast(mPos.y) - static_cast(mPos.z) + const int screenX = static_cast(mPos.x) + + offsetX - mImage->mBounds.w / 2; + const int screenY = static_cast(mPos.y) - static_cast(mPos.z) + offsetY - mImage->mBounds.h / 2; // Check if on screen -- cgit v1.2.3-60-g2f50