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: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [RFC] x & (1u << y)
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Wed, 13 Feb 2002 12:39:50 +0000 (GMT)

 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: 
> 
> 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?

Definitely 2 or 3 and my preference is 3
But they should all use underlying set_bit/test_bit macro/function.

G.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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