#1 Improve "const correctness"

open
nobody
None
5
2005-07-30
2005-07-30
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 examples.
- repository (function "repository_ok")

http://cvs.sourceforge.net/viewcvs.py/cvs-nserver/cvs-nserver/src/cvs-server.h?rev=1.2&view=markup

- where (functions "client_send_expansions")
message, vfile, vtag (function
"client_process_import_file")
repository, update_dir, filename (function
"client_notify")

http://cvs.sourceforge.net/viewcvs.py/cvs-nserver/cvs-nserver/src/client.h?rev=1.2&view=markup

- repository, update_dir (function "notify_check")
type, filename, who, val, watches, repository
(function "notify_do")
filename, editor, val (function "editor_set")
file (function "mark_up_to_date")

http://cvs.sourceforge.net/viewcvs.py/cvs-nserver/cvs-nserver/src/edit.h?rev=1.1.1.1&view=markup

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks