Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2003:
[Freeciv-Dev] (PR#6411) genlist cleanup
Home

[Freeciv-Dev] (PR#6411) genlist cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: per@xxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#6411) genlist cleanup
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 7 Oct 2003 14:06:20 -0700
Reply-to: rt@xxxxxxxxxxxxxx

[per - Mon Oct  6 15:23:17 2003]:

> This patch removes the now unnecessary genlist iterator struct and
> associated initializer function. This makes the genlist faster, since
> starting an iterator no longer involves any function calls, and the
> genlist codes become cleaner.
> 
> Requires PR#6408 and PR#6410.
> 
>   - Per

I'm really not happy with lines like this:

-         ITERATOR_NEXT(ent_iter);
-         ITERATOR_NEXT(col_iter);
+         ent_link = ent_link->next;
+         col_link = col_link->next;

at the least, let's change things to

  #define ITERATOR_NEXT(iter) ((iter)->next)

  ent_link = ITERATOR_NEXT(ent_link);

although this should probably use a properly-named speclist
macro/function instead.

jason



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