summaryrefslogtreecommitdiff
path: root/src/resources/safeopenglimagehelper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/safeopenglimagehelper.cpp')
-rw-r--r--src/resources/safeopenglimagehelper.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/resources/safeopenglimagehelper.cpp b/src/resources/safeopenglimagehelper.cpp
index d83c1b711..0256e81ea 100644
--- a/src/resources/safeopenglimagehelper.cpp
+++ b/src/resources/safeopenglimagehelper.cpp
@@ -130,17 +130,9 @@ Image *SafeOpenGLImageHelper::createTextSurface(SDL_Surface *const tmpImage,
int SafeOpenGLImageHelper::powerOfTwo(const int input)
{
- int value;
- if (mTextureType == GL_TEXTURE_2D)
- {
- value = 1;
- while (value < input && value < mTextureSize)
- value <<= 1;
- }
- else
- {
- value = input;
- }
+ int value = 1;
+ while (value < input && value < mTextureSize)
+ value <<= 1;
return value >= mTextureSize ? mTextureSize : value;
}