changeset 33119:8835e684a41d

Move common pixel shifting statement Since both branches of the condition perform it, do it right before. Besides, use more compact notation.
author ib
date Mon, 04 Apr 2011 14:06:08 +0000
parents ae464a957cd0
children e1403616342f
files gui/util/bitmap.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gui/util/bitmap.c	Mon Apr 04 13:49:57 2011 +0000
+++ b/gui/util/bitmap.c	Mon Apr 04 14:06:08 2011 +0000
@@ -237,10 +237,11 @@
         buf = (uint32_t *)in->Image;
 
         for (i = 0; i < out->Width * out->Height; i++) {
+            tmp >>= 1;
+
             if (buf[i] != transparent)
-                tmp = (tmp >> 1) | 0x80;
+                tmp |= 0x80;
             else {
-                tmp    = tmp >> 1;
                 buf[i] = 0;
                 shaped = 1;
             }