Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: proposal for minor change in tilespec.c, map.c
Home

[Freeciv-Dev] Re: proposal for minor change in tilespec.c, map.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx (Freeciv developers)
Subject: [Freeciv-Dev] Re: proposal for minor change in tilespec.c, map.c
From: Reinier Post <rp@xxxxxxxxxx>
Date: Tue, 28 Aug 2001 09:51:11 +0200

On Mon, Aug 27, 2001 at 10:45:40AM -0500, Mike Kaufman wrote:
> 
> in my quest for smaller code base and greater maintainability, I would
> like to get rid of tilespec.c from civworld/ and use the original one in
> client/
> 
> The main reason I want to do this is that I need to make approx 150 bytes
> of changes to a 50k file.
> 
> The issue: unfortuately for me, "ptile->known" is used for different
> things in the client and in the server. I need to use them both. A way to
> do this in tilespec.c without copying and changing it is to hijack
> tile_is_known().

Just a general remark: isn't the proper way to handle this a separation
of client-specific and server-specific fields in the common/ structs?
E.g. you could have a struct tile, struct client_tile and struct
server_tile where the latter two would share, or point to, the former.

By working around the problem in access functions you're really
propagating a data modelling error.

-- 
Reinier


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