summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-23 00:10:43 +0300
commitd97189f055798b5b2051c1c5770a3def62747461 (patch)
treed66a891dba33d2ce1c882e0de7d6145bb2e0326b /src/resources/image.cpp
parent25dce1399e40f24809842303d48ef090439de1e5 (diff)
downloadmanaplus-d97189f055798b5b2051c1c5770a3def62747461.tar.gz
manaplus-d97189f055798b5b2051c1c5770a3def62747461.tar.bz2
manaplus-d97189f055798b5b2051c1c5770a3def62747461.tar.xz
manaplus-d97189f055798b5b2051c1c5770a3def62747461.zip
Improve perfomance in some object constructors.
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/resources/image.cpp b/src/resources/image.cpp
index 4b5fa4f40..7cfb11822 100644
--- a/src/resources/image.cpp
+++ b/src/resources/image.cpp
@@ -51,15 +51,15 @@ Image::Image(SDL_Surface *image, bool hasAlphaChannel0, uint8_t *alphaChannel):
mHasAlphaChannel(hasAlphaChannel0),
mSDLSurface(image),
mAlphaChannel(alphaChannel),
+ mUseAlphaCache(SDLImageHelper::mEnableAlphaCache),
mIsAlphaVisible(hasAlphaChannel0),
- mIsAlphaCalculated(false)
-{
#ifdef USE_OPENGL
- mGLImage = 0;
+ mIsAlphaCalculated(false),
+ mGLImage(0)
+#else
+ mIsAlphaCalculated(false)
#endif
-
- mUseAlphaCache = SDLImageHelper::mEnableAlphaCache;
-
+{
mBounds.x = 0;
mBounds.y = 0;