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

[Freeciv-Dev] Re: (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] Re: (PR#6411) genlist cleanup
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 9 Oct 2003 15:05:24 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Per I. Mathisen wrote:
> On Tue, 7 Oct 2003, Jason Short wrote:
> 
>>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);
> 
> 
> What does this gain us?

It hides the fields of the struct, thus making the interface more reusable.

>>although this should probably use a properly-named speclist
>>macro/function instead.
> 
> Like what?

I don't know.

jason




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