Menu

#30 Improve "const correctness"

open
None
1
2008-06-11
2005-08-27
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.
-
http://cvs.sourceforge.net/viewcvs.py/robodoc/robo/Source/directory.h?rev=1.20&view=markup
path, filename (function "RB_Is_Source_File")
filename (functions "RB_To_Be_Skipped",
"RB_Not_Accepted")
arg_fullpath (function "RB_Get_.+")
p1, p2 (function "RB_.+_Compare")
arg_rb_directory (function "RB_Number_Of_.+")

-
http://cvs.sourceforge.net/viewcvs.py/robodoc/robo/Source/generator.h?rev=1.22&view=markup
src_name, title, toc, dest_name, charset (function
"RB_Generate_Doc_Start")
name (functions "RB_Generate_Item_.+")

-
http://cvs.sourceforge.net/viewcvs.py/robodoc/robo/Source/path.h?rev=1.8&view=markup
arg_pathname (function "RB_Get_RB_Path")
arg_current_path, arg_subdirectory (function
"RB_Get_RB_Path2")

Discussion

  • Markus Elfring

    Markus Elfring - 2005-12-18
    • assigned_to: nobody --> petterik
     
  • Markus Elfring

    Markus Elfring - 2005-12-18

    Logged In: YES
    user_id=572001

    How do you think about the appended corrections?

     
  • Markus Elfring

    Markus Elfring - 2005-12-18

    differences from 8 changed files

     
  • Frans Slothouber

    • priority: 5 --> 1
     

Log in to post a comment.