[Kst] kdeextragear-2/kst/devel-docs

George Staikos staikos at kde.org
Tue Jul 6 06:27:31 CEST 2004


CVS commit by staikos: 

notes about constness


  M +9 -0      codingstyle.txt   1.3


--- kdeextragear-2/kst/devel-docs/codingstyle.txt  #1.2:1.3
@@ -122,4 +122,13 @@
   platforms and unsigned on others, leading to all kinds of strange bugs.
 
+- Make methods const where applicable to allow use of const objects and
+  pointers.  Keep in mind if something may need to be non-const in the future
+  so that we don't break existing code.
+
+- Don't use unnecessary const_cast - much effort was put into making the code
+  "const correct".
+
+- Pass arguments and return values as const& where applicable for performance
+  reasons.
 
 - Why do we do this?  To make coding on Kst faster, easier, more consistent,





More information about the Kst mailing list