diff options
Diffstat (limited to 'src/resources')
-rw-r--r-- | src/resources/image.cpp | 6 | ||||
-rw-r--r-- | src/resources/image.h | 2 |
2 files changed, 2 insertions, 6 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp index 407274459..21c492845 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -183,7 +183,7 @@ SDL_Surface *Image::getByAlpha(const float alpha) return nullptr; } -void Image::setAlpha(float alpha) +void Image::setAlpha(const float alpha) { if (mAlpha == alpha || !ImageHelper::mEnableAlpha) return; @@ -223,11 +223,8 @@ void Image::setAlpha(float alpha) surface = getByAlpha(alpha); if (surface) { -// logger->log("hit"); if (mSDLSurface == surface) logger->log("bug"); -// else -// SDL_FreeSurface(mSDLSurface); mAlphaCache.erase(alpha); mSDLSurface = surface; mAlpha = alpha; @@ -237,7 +234,6 @@ void Image::setAlpha(float alpha) { mSDLSurface = SDLImageHelper::SDLDuplicateSurface(mSDLSurface); } - // logger->log("miss"); } mAlpha = alpha; diff --git a/src/resources/image.h b/src/resources/image.h index d7316d527..05350bb66 100644 --- a/src/resources/image.h +++ b/src/resources/image.h @@ -103,7 +103,7 @@ class Image : public Resource /** * Sets the alpha value of this image. */ - virtual void setAlpha(float alpha); + virtual void setAlpha(const float alpha); /** * Returns the alpha value of this image. |