Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [PATCH] Use is_real_tile() everywhere.
Home

[Freeciv-Dev] Re: [PATCH] Use is_real_tile() everywhere.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] Use is_real_tile() everywhere.
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Sun, 14 Oct 2001 21:42:25 +0100

On Sun, 14 Oct 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> On Sun, Oct 14, 2001 at 08:17:08PM +0100, Gaute B Strokkenes wrote:
>> 
>> I spotted some places where is_real_tile() is not being used.
> 
> The (now) correct patch is to use is_normal_map_pos. is_real_tile
> will also allow wrapped map positions.

No.

Firstly, the client GUIs do their own coordinate normalisation magic,
and I'm reluctant to change the semantics unless someone can assure me
that the change is a good one.

Secondly, no piece of code in Freeciv should ever produce
un-normalised coordinates, ever.  Corollary: no piece of code in
Freeciv should ever have to check if a given pair of coordinates is
indeed normalised.  (The exception is off course consistency
checks/asserts where this is precisely the right check.)  Thus
nilly-willy replacement of  is_real_tile() with a check for
normalisation as well is definitely the wrong fix (and also a
pessimising fix.)

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
I'll take ROAST BEEF if you're out of LAMB!!


[Prev in Thread] Current Thread [Next in Thread]