Menu

#11 Improve const correctness

open
nobody
None
5
2005-07-31
2005-07-31
No

Would you like to apply the advices from the article
"http://en.wikipedia.org/wiki/Const_correctness" to
your sources?
I suggest to add the key word "const" to the type
specifiers for parameters like the following.
- image_filenames, sound_filenames, music_filenames

http://cvs.sourceforge.net/viewcvs.py/tuxtype/tuxtype2/tuxtype2/tuxtype/laser.h?rev=1.11&view=markup

- rs, num (function "SNOW_add")
img (function "SNOW_setBkg")

http://cvs.sourceforge.net/viewcvs.py/tuxtype/tuxtype2/tuxtype2/tuxtype/snow.h?rev=1.2&view=markup

- src (function "AddRect")
musicFilename (function "audioMusicLoad")
dirname (function "setupTheme")
file (function "load_trans")
datafile (functions "Load.+")

http://cvs.sourceforge.net/viewcvs.py/tuxtype/tuxtype2/tuxtype2/tuxtype/funcs.h?rev=1.39&view=markup

Discussion


Log in to post a comment.