From 46f7f29cec9027ab01a6558cd676cc2092c29fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 6 Oct 2012 12:28:20 +0200 Subject: [PATCH] Avoid LLVM warning --- base/color.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base/color.h b/base/color.h index 3206c7f75a..5a382bc15a 100644 --- a/base/color.h +++ b/base/color.h @@ -3,7 +3,7 @@ typedef unsigned int Color; //have to use a define to ensure constant folding.. with an inline I don't get that, sucks -#define COLOR(i) (((i << 16) & 0xFF0000) | (i & 0xFF00) | ((i >> 16) & 0xFF) | 0xFF000000) +#define COLOR(i) (((i&0xFF) << 16) | (i & 0xFF00) | ((i & 0xFF0000) >> 16) | 0xFF000000) inline Color darkenColor(Color color) { return (color & 0xFF000000) | ((color >> 1)&0x7F7F7F); } @@ -13,4 +13,4 @@ inline Color whitenColor(Color color) { inline Color colorInterpol(Color x, Color y, int n) { // TODO return x; -} \ No newline at end of file +}