[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 >
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.
Capabilities are done on a per-packet basis, right? What happens if you
have 2 capabilities in one packet? Do you get 4 functions, or 3?
jason
- [Freeciv-Dev] Re: (PR#7418) memory usage for compiling, Jason Short, 2004/02/12
- [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 <=
- [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, 2004/02/16
|
|