Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] Re: (PR#7418) memory usage for compiling
Home

[Freeciv-Dev] Re: (PR#7418) memory usage for compiling

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ue80@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7418) memory usage for compiling
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Mon, 16 Feb 2004 12:02:37 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7418 >

On Mon, Feb 16, 2004 at 11:43:02AM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7418 >
> 
> Raimar Falke wrote:
> 
> > It would be possible to merge these variants in one function but you
> > would end up with code like:
> > 
> >   if (BV_ISSET(fields, variant==100?4:5)) {
> >     variant==100?dio_get_uint8(&din, (int *) &real_packet->veteran):
> >     dio_get_bool8(&din, (int *) &real_packet->veteran);
> >   }
> > 
> > but this is harder to generate and harder to read.
> 
> if (variant == 101) {
>    if (BF_ISSET(fields, field)) {
>      dio_get_uint8(&din, (int *) &real_packet->veteran);
>    }
>    field++;
> }
> 
> Though I don't know that this would actually make compilation simpler.

Yes.

> Capabilities are done on a per-packet basis, right?

Yes.

> What happens if you have 2 capabilities in one packet?  Do you get 4
> functions, or 3?

4. And 8 if you have 3 capabilities.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "The two rules for success in life are:
  1) Never tell them everything you know."




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