[Freeciv-Dev] Re: [PATCH] Use is_real_tile() everywhere.
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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!!
|
|