Am Montag, 8. Januar 2007 00:50 schrieb Giel van Schijndel: > Author: muggenhor > Date: Mon Jan 8 00:50:30 2007 > New Revision: 611 > > URL: http://svn.gna.org/viewcvs/warzone?rev=611&view=rev > Log: > enabled some more code to compile with a C++ compiler without -fpermissive > (i.e. there should be *less* compile-time errors now) * moved several > #defines to the enums where they belong > * changed some datatypes on declaration > * prepended casts to malloc calls (using typeof() style) > * changed some (void*) casts to (void**) where required > * removed several #defines and there instances and then replaced them with > their corresponding values from an enum > > Modified: > trunk/src/statsdef.h You did things like:
NUM_MOVEMENT_MODEL, INVALID_MOVEMENT = NUM_MOVEMENT_MODEL + 1 In fact INVALID_MOVEMENT will be NUM_MOVEMENT_MODEL+1 anyway, since it follows NUM_MOVEMENT_MODEL in the enum declaration... I think it doesn't confuse the reader if you simply add INVALID_MOVEMENT to the enum, without setting it to a specific value. Additionally this would not create any problems if someone decided to add another entry to the struct. In your style INVALID_MOVEMENT will allways be NUM_MOVEMENT+1, even though it is not the last element in the enum. This might create a problems later on. --Dennis
pgpnMRFkbFhTn.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
