[crossfire] code cleanup commit.

Nicolas Weeger (Laposte) nicolas.weeger at laposte.net
Mon Jun 5 15:54:39 CDT 2006


>   I just did a commit which really doesn't change any code, but does clean
> up some compiler warnings (now the core area compiles without warnings when
> compiled with gcc -Wall -Wno-char-subscripts).

Hum, I see no commit mail from you, probably lost in SF's abyssal system :)

>   That said, my belief would be that if there are no indications that they
> are needed, those blocks of codes should just get removed in a couple
> months - no reason to have code around that no one is using (and if someone
> really wants it again, it is in CVS).

Agreed here. Old code should just go, CVS is here for history :)

> Which are harmless, but I think we should do a real logging system so that
> isn't needed - instead, pass in the type of log message (object, map,
> player, spell) to the log function, and then be able to specify what log
> messages we want via command like, like 'crossfire -debugmsg +map,+player'
> - that is what a lot of other programs do, and to me makes a lot more
> sense.

Would require a rewrite of log stuff, and many call. I'd say we should do it 
at once though, it will avoid having deprecated LOG and new LOG2 around :)

>   A fair number of other #if 0 are disabling small portions of code to turn
> off some undesirable behaviour.  I'm thinking that these should either be
> just pulled out, or if they might be useful, should be enabled either via
> real #ifdefs or settings.

Agreed on that. If something is disabled, either it's broken and should go, or 
should be compilable through settings.
Maybe though as many things as possible should be settings, not #define. 
Simply because Crossfire is not too easy to compile under Windows, so I'd 
rather have people use settings than say « please recompile with 
--enable-obscure-feature » :)

Nicolas



More information about the crossfire mailing list