Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2001:
[Freeciv-Dev] Re: generalized unit capabilities
Home

[Freeciv-Dev] Re: generalized unit capabilities

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: Freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: generalized unit capabilities
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 6 Dec 2001 09:08:09 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Dec 05, 2001 at 08:39:21PM -0500, Jason Short wrote:
> Vasco Alexandre Da Silva Costa wrote:
> 
> > On Wed, 5 Dec 2001, Raimar Falke wrote:
> > 
> > 
> >>About running out of space for bits for the flags: I agree that this
> >>is a problem, but a problem which can be solved in a 100 lines patch.
> > 
> > Well i have this old code i made lying around for bit flag arrays. I have
> > sent it attached. It has 26 LOC.
> 
> 
> Nice and simple - a cleaner and more extensible variant of Raimar's 
> solution.

Ack. But this is all unneeded at the moment IMHO. 64 flags will always
suffice [TM] ;) Lets wait for the first 60 flags (this will take 10
years) and than we can go to 1024 flags ;)

> > /* structure for bitvectors */
> > typedef struct bv_set
> > {
> >   uint_8 bits[_BV_DELT(BV_SETSIZE)];
> > }bv_set;
> 
> Consider the case where BV_SETSIZE is not a multiple of 8.  I think the 
> line should say
> 
>    uint_8 bits[_BV_DELT(BV_SETSIZE+7)];
> 
> Then you can get rid of the "this number MUST be >= 8!" comment as well.
> 
> Alternately, you can just change that comment to "this number MUST be a 
> multiple of 8!".

I also noticed this.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "Only one human captain has ever survived battle with the Minbari
  fleet. He is behind me. You are in front of me. If you value your 
  lives, be somewhere else."
    -- Ambassador Delenn, "Severed Dreams," Babylon 5


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