[Freeciv-Dev] Re: Profile.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, 26 Sep 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> diff -urd -x prof -X freeciv.current/diff_ignore work/common/map.c
> no_check/common/map.c
> --- work/common/map.c Wed Sep 26 14:21:08 2001
> +++ no_check/common/map.c Wed Sep 26 18:31:26 2001
> @@ -1289,7 +1289,9 @@
>
> int is_real_tile(int x, int y)
> {
> - return 0 <= y && y < map.ysize;
> + int x1 = x, y1 = y;
> +
> + return normalize_map_pos(&x1, &y1);
> }
>
> /**************************************************************************
> @@ -1302,10 +1304,7 @@
> while (*x >= map.xsize)
> *x -= map.xsize;
>
> - if (!is_real_tile(*x, *y))
> - return FALSE;
> -
> - return TRUE;
> + return (0 <= *y && *y < map.ysize);
> }
>
> /**************************************************************************
I would do this the other way round; change the end of
normalize_map_pos() to read "return is_real_tile(*x, *y)" and leave
is_real_tile() as-is.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
What I want to find out is -- do parrots know much about Astro-Turf?
[Freeciv-Dev] Re: Profile., Gaute B Strokkenes, 2001/09/27
|
|