[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]
On Sun, Oct 28, 2001 at 02:58:20PM -0500, Jason Dorje Short wrote:
> 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.
We will see how many checks are in your next patch.
> 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.
Note that before I accept this patch some extra checks have to be
inserted into map_inx.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning."
-- Rich Cook
|
|