[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]
On Tue, Aug 21, 2001 at 12:43:29PM -0400, Justin Moore wrote:
>
> > > Why not just:?
> > >
> > > > struct sortlist {
> > > > int capacity;
> > > > int num_links;
> > > > void *data;
> > > > };
>
> Here are the changes. The actual array ended up being a void** so it
> would be an array of generic pointers. Also I've replaced the for() loops
> which moved the data with memmoves to scoot everything up or back on
> insertions and deletions. As always, feel free to double-check my math on
> the moves and insertion and such.
I'm still not convinced that an always sorted list is necessary. The
removal of this would simplify the code. The only place which uses
sorting is in server/savegame.c.
> struct sortlist {
> int capacity;
> int num_links;
> void **data;
> };
Could you move this into the c file?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Sit, disk, sit. Good boy. Now spin up. Very good. Here's a netscape
cookie for you. Fetch me some data. Come on, you can do it. No, not that
data. Bad disk. Bad."
-- Calle Dybedahl, alt.sysadmin.recovery
- [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, 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 <=
- [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
[Freeciv-Dev] Re: [PATCH] Small improvement at genlist and maphand, Markus Linnala, 2001/08/20
|
|