# HG changeset patch # User ib # Date 1301925968 0 # Node ID 8835e684a41dd4f904f62595ffae9e7028e058c4 # Parent ae464a957cd08b64a0e6e0bb453963bce95a4778 Move common pixel shifting statement Since both branches of the condition perform it, do it right before. Besides, use more compact notation. diff -r ae464a957cd0 -r 8835e684a41d gui/util/bitmap.c --- 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; }