Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [RFC] x & (1u << y)
Home

[Freeciv-Dev] Re: [RFC] x & (1u << y)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] x & (1u << y)
From: Petr Baudis <pasky@xxxxxxxxxxx>
Date: Wed, 13 Feb 2002 10:59:55 +0100

Dear diary, on Wed, Feb 13, 2002 at 10:06:13AM CET, I got a letter,
where Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> told me, that...
> 
> There are a lot of constructs like "x & (1u << y)" in the code:
>  - city options, flags and roles
>  - shared vision
>  - embassy
>  - claims
>  - gotohand
>  - known and sent in maphand
> 
> These all are used as a bool but aren't a bool. Should they be wrapped
> with BOOL_VAL, a new test_bit or with functions specific to the
> domains above?

I would obviously prefer domain-specific functions :-). When we are already
doing this for contains_special() ..

-- 

                                Petr "Pasky" Baudis

* UN*X programmer && admin         * IPv6 guy (XS26 co-coordinator)
* elinks maintainer                * FreeCiv AI hacker
* IRCnet operator
.
I love deadlines.
I love the whooshing sound they make as they fly by.
-- Douglas Adams.
.
Public PGP key && geekcode && homepage: http://pasky.ji.cz/~pasky/


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