Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2004:
[Freeciv-Dev] (PR#9637) Ocean numbers
Home

[Freeciv-Dev] (PR#9637) Ocean numbers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxxx, jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] (PR#9637) Ocean numbers
From: "Marcelo Burda" <mburda@xxxxxxxxx>
Date: Thu, 12 Aug 2004 10:34:04 -0700
Reply-to: rt@xxxxxxxxxxx

<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)))) {
> 
> --
> mateusz
> 
Mateusz,

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.
Marcelo


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