[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]
<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
|
|