[Freeciv-Dev] Re: (PR#6411) genlist cleanup
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
|
|