[Freeciv-Dev] Re: (PR#9637) Ocean numbers
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=9637 >
Marcelo Burda wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=9637 >
>
>>[mstefek - Lun. Aoû. 09 09:08:05 2004]:
>>
>>
>>>2. This code:
>>>
>>>+ if ((is_land && is_ocean(map_get_terrain(x, y)))
>>>+ || (!is_land && !is_ocean(map_get_terrain(x, y)))) {
>>>
>>
>>Proposition:
>>
>> if (!(is_land ^ is_ocean(map_get_terrain(x, y)))) {
> if (!(is_land == is_ocean(map_get_terrain(x, y)))) {
> or best
> if ((is_land != is_ocean(map_get_terrain(x, y)))) {
>
> is the right way,m ^ is to be used with bits.
^ is to be used with bits but as long as the values are 0 or 1 it will
work. The == check will also work only with values of 0 and 1. 1 != 2
but both are "true".
jason
- [Freeciv-Dev] Re: (PR#7338) [RfP] Ocean numbers, Jason Short, 2004/08/11
- [Freeciv-Dev] (PR#9637) Ocean numbers, Gregory Berkolaiko, 2004/08/11
- [Freeciv-Dev] (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/12
- [Freeciv-Dev] (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/12
- [Freeciv-Dev] (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/12
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers,
Jason Short <=
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Jason Short, 2004/08/12
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Jason Short, 2004/08/12
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/13
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/13
- [Freeciv-Dev] (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/13
- [Freeciv-Dev] (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/13
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Gregory Berkolaiko, 2004/08/13
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Marcelo Burda, 2004/08/13
- [Freeciv-Dev] (PR#9637) Ocean numbers, Gregory Berkolaiko, 2004/08/13
- [Freeciv-Dev] Re: (PR#9637) Ocean numbers, Jason Short, 2004/08/13
|
|