From bf31378ffc39eb825d5cccb701c0c3b86ee0793f Mon Sep 17 00:00:00 2001 From: Mathieu Schroeter Date: Tue, 26 Jun 2018 19:11:49 +0200 Subject: [PATCH] Cosmetics --- src/pixmap.cxx | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/pixmap.cxx b/src/pixmap.cxx index 87177b6..b950340 100644 --- a/src/pixmap.cxx +++ b/src/pixmap.cxx @@ -322,16 +322,9 @@ CPixmap::Cache ( Sint32 access, ow, w, oh, h; SDL_QueryTexture (texture, &format, &access, &ow, &oh); - if (mode == EXPAND || channel == CHBACK) - { - w = LXIMAGE; - h = LYIMAGE; - } - else - { - w = ow; - h = oh; - } + auto m = mode == EXPAND || channel == CHBACK; + w = m ? LXIMAGE : ow; + h = m ? LYIMAGE : oh; if (m_SDLTextureInfo.find (channel) == m_SDLTextureInfo.end ()) {