[Freeciv-Dev] Re: [patch] clause_list speclist
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Tue, Sep 18, 2001 at 06:08:05PM -0400, Justin Moore wrote:
>
> Going through the common and server code, I noticed some places in the
> diplomacy code where for() loops were used instead of speclist stuff.
> Noticed speclist stuff didn't exist for treaty clauses. Created speclist
> types for treaty clauses. Treaty clauses now seem more content with their
> place in life. :) Not that this is a huge performance gain; more for
> consistancy among the iterators.
I love such patches.
> + struct city *pcity;
> - for (;ITERATOR_PTR(myiter); ITERATOR_NEXT(myiter)) {
> - struct Clause *pclause = (struct Clause *)ITERATOR_PTR(myiter);
> - struct city *pcity;
> -
> + clause_list_iterate(ptreaty->clauses, pclause) {
IMHO variables should be declared in the most inner scope to prevent a
pollution of the namespace.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
The trick is to keep breathing.
|
|