[Freeciv-Dev] Re: [PATCH] use S_NO_SPECIAL (PR#1311)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Mar 13, 2002 at 11:37:38AM +0000, Gregory Berkolaiko wrote:
> On Wed, 13 Mar 2002, Raimar Falke wrote:
> > On Sun, Mar 10, 2002 at 08:08:29AM -0800, Markus Linnala wrote:
> > >
> > > Use S_NO_SPECIAL instead of 0.
> > Attached is an updated version. Changes:
> > - catch all such cases which are related to activity_target
> > - change int to enum tile_special_type in cases which are related to
> > activity_target
> The patch is very nice. I didn't notice any wrong-doings apart from these
> + secfile_lookup_int_default(file, S_NO_SPECIAL,
> + "player%d.u%d.activity_target", plrno, i);
> you should probalby cast S_NO_SPECIAL (you do cast on another occasion,
> so be consistent).
Ok. Although the error classes are others.
> 2. Is (S_RIVER | S_ROAD) still of "enum tile_special_type" type? I
> remember we discussed it and I think the conclusion was that yes it is.
> But if my memory fails me (as per usual), then there is one occurence of
> ORing two specials...
Yes "(S_RIVER | S_ROAD)" still has the type "enum tile_special_type".
> Overall the patch is very useful. No more wandering "so what 0 stands for
> in this can_unit_do_activity_targeted call??".
> If it compiles and the savegames are identical, apply it straightaway.
Or compare the asm-output.
"Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe trying
to produce bigger and better idiots. So far, the Universe is winning."
-- Rich Cook