Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2005:
[Freeciv-Dev] Re: (PR#13474) a city_production struct
Home

[Freeciv-Dev] Re: (PR#13474) a city_production struct

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#13474) a city_production struct
From: "Benoit Hudson" <benoit.hudson@xxxxxxxxx>
Date: Thu, 14 Jul 2005 16:10:13 -0700
Reply-to: bugs@xxxxxxxxxxx

<URL: http://bugs.freeciv.org/Ticket/Display.html?id=13474 >

I was thinking of doing this patch at some point but never got around
to it.  It seems like we'd want to have a struct {
    bool is_unit;
    building_type_id building;
    unit_type_id unit;
};
for better debugging.  Whichever field is not set should be X_LAST. 
This would better catch bugs where someone forgets to check is_unit.

What we have currently is, essentially, just a union.  And unions are
almost always a bad idea.





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