changeset 4481:20335829e6bc draft

(svn r6266) Replace four shifts by a single multiplication and let the compiler handle what to do with it - it does a better job
author tron <tron@openttd.org>
date Thu, 31 Aug 2006 11:25:00 +0000
parents 92328d568c04
children a9719e68f761
files smallmap_gui.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/smallmap_gui.c
+++ b/smallmap_gui.c
@@ -427,8 +427,7 @@
 	TileType t = GetEffectiveTileType(tile);
 
 	if (t == MP_INDUSTRY) {
-		byte color = _industry_smallmap_colors[GetIndustryGfx(tile)];
-		return color + (color << 8) + (color << 16) + (color << 24);
+		return _industry_smallmap_colors[GetIndustryGfx(tile)] * 0x01010101;
 	}
 
 	return ApplyMask(MKCOLOR(0x54545454), &_smallmap_vehicles_andor[t]);