[Freeciv-Dev] Re: PATCH: map iteration (PR#1018)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Gaute B Strokkenes wrote:
>
> On Tue, 30 Oct 2001, rwetmore@xxxxxxxxxxxx wrote:
>
> > At 05:17 AM 01/10/30 -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> >>4. Is regular_map_pos_is_normal good, or should we stick to
> >>is_normal_map_pos? Again, regular_map_pos_is_normal provides
> >>identical functionality but assumes the map position it is given is
> >>"regular", i.e. within (0..map.xsize-1,0..map.ysize-1). This makes
> >>it much faster.
> >
> > I'm not much of a fan of regular. You need to demonstrate it a bit
> > more to show any real value. If it never does anything, then dubious
> > dregs like this are just noise.
>
> I agree with Ross.
>
> Until and unless someone exhibits a shape which requires such a
> concept, guaranteeing that each tile occurs precisely once in
>
> [0, map.xsize) x [0, map.ysize)
>
> and using a two nested for loops with is_real_tile() inside offers a
> good tradeoff between readability, predictability, efficiency and
> generality. There is not reason to create problems for ourselves
> before we have to.
An iso-rectangular map with any kind of wrapping will have a number of
tiles that occur multiple times within that space. My
general-topologies patch provides such a topology.
What matter whether we check for normal tiles or real ones in the loop?
Is it less readable? It sounds to me like you're proposing the same
basic solution to the problem that I have.
I just don't quite understand where you're coming from here. What
exactly is it you think I'm doing that's wrong?
jason
|
|