[Freeciv-Dev] Re: (PR#7418) memory usage for compiling
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<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."
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, (continued)
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Raimar Falke, 2004/02/13
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, ue80@xxxxxxxxxxxxxxxxxxxxx, 2004/02/13
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Raimar Falke, 2004/02/13
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, ue80@xxxxxxxxxxxxxxxxxxxxx, 2004/02/13
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Raimar Falke, 2004/02/13
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, ue80@xxxxxxxxxxxxxxxxxxxxx, 2004/02/13
- [Freeciv-Dev] (PR#7418) memory usage for compiling, Jason Short, 2004/02/15
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Jason Short, 2004/02/15
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Raimar Falke, 2004/02/16
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Jason Short, 2004/02/16
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling,
Raimar Falke <=
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Jason Short, 2004/02/16
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Raimar Falke, 2004/02/16
|
|