Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: [PATCH] check_map_pos change (PR#1031)
Home

[Freeciv-Dev] Re: [PATCH] check_map_pos change (PR#1031)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [PATCH] check_map_pos change (PR#1031)
From: Jason Dorje Short <vze2zq63@xxxxxxxxxxx>
Date: Sun, 28 Oct 2001 14:58:20 -0500
Reply-to: jdorje@xxxxxxxxxxxx

Raimar Falke wrote:
> 
> On Fri, Oct 26, 2001 at 01:10:17AM -0700, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> > The attached patch implements and uses a macro called check_map_pos(&x,
> > &y) to check the coordinates (x,y) for normalness.

> I think that we agreed that instead of replacing normalize_map_pos,
> is_real_tile and co with check_map_pos we just remove them and trust
> that we would catch all bad position in an access method (one which
> uses map_inx). Look at this problem from this point of view: now every
> method only accepts normal map positions. Why should some method have
> a check for this and some not. Because of historical reasons?
> No. Either all method have such a check or none. And I agree that none
> is ok. If there are problems we can add extra checks. But we don't
> expect problems ;)

Yes, but I thought we were going to go with all-out replacement first
and then scale back.

No matter, I can remove the spurious checks.  I'd prefer to only remove
the obviously spurious ones, though, and leave any that might be
debatable until it's been in CVS for a while.  There really hasn't been
enough testing of this to be even reasonably sure things are correct
otherwise, and if we don't catch any mistakes in check_map_pos the odds
are we won't catch them.

Patch will follow.

jason


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