From d6996c110add9e1619162405f899c528294f5893 Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 10 Jun 2009 13:44:37 +0000 Subject: [PATCH] (svn r16551) -Codechange: use shift instead of multiplication in TileXY() --- src/map_func.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map_func.h b/src/map_func.h index 265b88741e..537b1f9a70 100644 --- a/src/map_func.h +++ b/src/map_func.h @@ -161,7 +161,7 @@ typedef int32 TileIndexDiff; */ static inline TileIndex TileXY(uint x, uint y) { - return (y * MapSizeX()) + x; + return (y << MapLogX()) + x; } /**