Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [Patch] Remove destroy_worklist()
Home

[Freeciv-Dev] Re: [Patch] Remove destroy_worklist()

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] Remove destroy_worklist()
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 24 Feb 2002 11:24:51 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

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."

Attachment: embed_worklist1.diff
Description: Text document


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