From 8d276b3f5707035600c051d1746697cf7d815140 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 28 Feb 2013 21:34:28 +0300 Subject: improve other files. --- src/depricatedevent.cpp | 2 +- src/depricatedevent.h | 4 ++-- src/imageparticle.cpp | 2 +- src/imagesprite.cpp | 4 +--- 4 files changed, 5 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/depricatedevent.cpp b/src/depricatedevent.cpp index 37826ac24..9cb37ac85 100644 --- a/src/depricatedevent.cpp +++ b/src/depricatedevent.cpp @@ -69,7 +69,7 @@ void DepricatedEvent::setString(const std::string &key, mData[key] = new StringData(value); } -const std::string &DepricatedEvent::getString(const std::string &key) const +const std::string DepricatedEvent::getString(const std::string &key) const { const VariableMap::const_iterator it = mData.find(key); if (it == mData.end()) diff --git a/src/depricatedevent.h b/src/depricatedevent.h index b7b52e671..239969c63 100644 --- a/src/depricatedevent.h +++ b/src/depricatedevent.h @@ -141,8 +141,8 @@ class DepricatedEvent final void setString(const std::string &key, const std::string &value); - const std::string &getString(const std::string &key) - const A_WARN_UNUSED; + const std::string getString(const std::string &key) + const A_WARN_UNUSED; // Sets or gets a floating point number with key to identify void setFloat(const std::string &key, double value); diff --git a/src/imageparticle.cpp b/src/imageparticle.cpp index 31eba7333..457d66cc6 100644 --- a/src/imageparticle.cpp +++ b/src/imageparticle.cpp @@ -73,7 +73,7 @@ bool ImageParticle::draw(Graphics *const graphics, const int offsetX, const int offsetY) const { FUNC_BLOCK("ImageParticle::draw", 1) - if (!isAlive() || !mImage) + if (mAlive != ALIVE || !mImage) return false; const int screenX = static_cast(mPos.x) diff --git a/src/imagesprite.cpp b/src/imagesprite.cpp index 7d19034e5..887ef0bdd 100644 --- a/src/imagesprite.cpp +++ b/src/imagesprite.cpp @@ -55,8 +55,6 @@ bool ImageSprite::draw(Graphics *const graphics, if (!mImage) return false; - if (mImage->getAlpha() != mAlpha) - mImage->setAlpha(mAlpha); - + mImage->setAlpha(mAlpha); return graphics->drawImage(mImage, posX, posY); } -- cgit v1.2.3-70-g09d2