[Freeciv-Dev] Re: [Patch] Remove destroy_worklist()
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Thu, Feb 21, 2002 at 03:46:52PM +0100, Raimar Falke wrote:
>
> destroy_worklist is used in the source. The only class of objects
> which have dynamic worklists are cities. So the line
> free(pcity->worklist);
> in game_remove_city could be replaced with a call to
> destroy_worklist. But IMHO the free is ok.
The attached patch embeds the worklist into struct city. This way we
don't have to care about allocation. So also create_worklist could be
removed.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Heuer's Law: Any feature is a bug unless it can be turned off."
embed_worklist1.diff
Description: Text document
|
|