Complete.Org: Mailing Lists: Archives: freeciv-ai: May 2004:
[freeciv-ai] Re: [RFC] (PR#8805) Cleaning up build system
Home

[freeciv-ai] Re: [RFC] (PR#8805) Cleaning up build system

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gregory.Berkolaiko@xxxxxxxxxxxxx
Subject: [freeciv-ai] Re: [RFC] (PR#8805) Cleaning up build system
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 24 May 2004 11:57:49 -0700
Reply-to: rt@xxxxxxxxxxx

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

Gregory Berkolaiko wrote:

>>>  int choice;   /* Unit_Type_id or Impr_Type_id of the choice */
>>
>>Should be a union.
> 
> Please elaborate.

union {
   Unit_Type_id unit;
   Impr_Type_id impr;
} choice;

Of course both values are ints, so there's no extra typesafeness to 
this.  But it is more logical and more legible.  An extra 5 characters 
are needed for accesses but this is like auto-commenting...

jason




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