[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
> > struct sortlist_link {
> > void *dataptr;
> > };
> >
> > struct sortlist {
> > int capacity;
> > int num_links;
> > struct sortlist_link *data;
> > };
>
> Why not just:?
>
> > struct sortlist {
> > int capacity;
> > int num_links;
> > void *data;
> > };
>
> If you remove the extra indirection and the sorting we have a
> dynamically sized array. What do you think about this?
That works, too. The only reason I had for doing it the way I did was
for slightly easier migration of the code from genlists to sortlists. I
wasn't sure of all the possible contexts that genlists were used and how
difficult it would be to update it, so I had the sortlist API and
(somewhat) visible layer mirror genlist.
I'll make the changes and start hunting around for some replacement
candidates.
> "I was dead ... but I'm better now."
> -- Capitain Sheridan in Babylon 5
"I feel HAPPY!!!"
-- MP&THG
-jdm
Department of Computer Science, Duke University, Durham, NC 27708-0129
Email: justin@xxxxxxxxxxx
- [Freeciv-Dev] [PATCH] Small improvement at genlist and maphand, Markus Linnala, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Markus Linnala, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Justin Moore, 2001/08/20
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand,
Justin Moore <=
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Justin Moore, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Justin Moore, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Justin Moore, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Trent Piepho, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Justin Moore, 2001/08/23
- Message not available
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Ross W. Wetmore, 2001/08/21
- [Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Raimar Falke, 2001/08/22
|
|