Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#7213) is_attack_unit(punit)
Home

[Freeciv-Dev] Re: (PR#7213) is_attack_unit(punit)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: a-l@xxxxxxx
Subject: [Freeciv-Dev] Re: (PR#7213) is_attack_unit(punit)
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Thu, 8 Jan 2004 12:44:01 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=7213 >

On Wed, Jan 07, 2004 at 08:32:12AM -0800, Arnstein Lindgard wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=7213 >
> 
> Boolean expression funct is_attack_unit(punit).
> Different from is_military_unit(punit) ...

>  /**************************************************************************
>  ...
>  **************************************************************************/
> +bool is_attack_unit(struct unit *punit)

Please add a comment here. What is the differnce to is_military_unit
here?

> -  if (is_military_unit(punit) && unit_type(punit)->attack_strength > 0
> -      && map_get_city(punit->x, punit->y))
> +  }
> +  if (is_attack_unit(punit) && map_get_city(punit->x, punit->y)) {
>      return TRUE;
> +  }

This doesn't seem an equivalent transformation.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  "brand memory are for windows users that think their stability
   problems come from the memory"
    -- bomek in #freeciv




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