diff options
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); } |