From d97189f055798b5b2051c1c5770a3def62747461 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 23 Jul 2012 00:10:43 +0300 Subject: Improve perfomance in some object constructors. --- src/resources/image.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/resources/image.cpp') 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; -- cgit v1.2.3-60-g2f50