diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-02-28 21:34:28 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-02-28 21:34:28 +0300 |
commit | 8d276b3f5707035600c051d1746697cf7d815140 (patch) | |
tree | b94a9b87ace1cd3638b322607fb54afdfc4c6279 /src | |
parent | 5ae7168e1f30efa4fd61c155eaecd55ce83bea14 (diff) | |
download | plus-8d276b3f5707035600c051d1746697cf7d815140.tar.gz plus-8d276b3f5707035600c051d1746697cf7d815140.tar.bz2 plus-8d276b3f5707035600c051d1746697cf7d815140.tar.xz plus-8d276b3f5707035600c051d1746697cf7d815140.zip |
improve other files.
Diffstat (limited to 'src')
-rw-r--r-- | src/depricatedevent.cpp | 2 | ||||
-rw-r--r-- | src/depricatedevent.h | 4 | ||||
-rw-r--r-- | src/imageparticle.cpp | 2 | ||||
-rw-r--r-- | src/imagesprite.cpp | 4 |
4 files changed, 5 insertions, 7 deletions
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<int>(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); } |