[Freeciv-Dev] Re: PATCH: map iteration (PR#1018)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
--
Big Gaute http://www.srcf.ucam.org/~gs234/
FUN is never having to say you're SUSHI!!
- [Freeciv-Dev] Re: PATCH: map iteration (PR#1018),
Gaute B Strokkenes <=
|
|