Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [PATCH] slight optimisation at client/packhand.c
Home

[Freeciv-Dev] Re: [PATCH] slight optimisation at client/packhand.c

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Markus Linnala <maage@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [PATCH] slight optimisation at client/packhand.c
From: Gaute B Strokkenes <gs234@xxxxxxxxx>
Date: Thu, 16 Aug 2001 01:37:55 +0200

On 15 Aug 2001, maage@xxxxxxxxx wrote:

> -  if(punit && punit==get_unit_in_focus())
> +  aunit = get_unit_in_focus();
> +  if(punit && aunit && punit==aunit)
>      update_unit_info_label(punit);
> -  else if(get_unit_in_focus() && get_unit_in_focus()->x==punit->x &&
> -       get_unit_in_focus()->y==punit->y) {
> -    update_unit_info_label(get_unit_in_focus());
> +  else if(aunit && aunit->x==punit->x && aunit->y==punit->y) {
> +    update_unit_info_label(aunit);

This needs more spaces.  Also, the && should be at the beginning of
the line, not the end.

I know the original code was like that, but that's no excuse not to
fix it...  8-)

-- 
Big Gaute                               http://www.srcf.ucam.org/~gs234/
I'm a fuschia bowling ball somewhere in Brittany


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