[crossfire] Code (spring) cleaning

Mark Wedel mwedel at sonic.net
Fri Apr 15 01:28:45 CDT 2005


Nicolas Weeger wrote:
>
     
      Hello.
     
     >
     
     
     >
     
      There are *many* places in the code where char* are used as arguments, 
     
     >
     
      when const char* would be really all right.
     
     >
     
     
     >
     
      So I'd like to clean that, to use const char* everywhere this is 
     
     >
     
      appropriate.
     
     >
     
     
     >
     
      This means many changes in functions in many files. I don't think that 
     
     >
     
      would break things. Of course some functions legitimately can use char 
     
     >
     
      when needed (to return arguments and so on).
     
     >
     
     
     >
     
      In the same topic, some function, many descriptive functions (for items, 
     
     >
     
      monsters, and such) use a static char buffer, and return char*. This too 
     
     >
     
      imo should be const char*, as you don't control the buffer and shouldn't 
     
     >
     
      change it - but that's my opinion.
     
     >
     
     
     >
     
      Any objection to the first pass cleaning (argument)?
     
     
  fine by me.

    
    


More information about the crossfire mailing list