diff --git a/development/ChangeLog b/development/ChangeLog index 253b3e303e..1346a9e9db 100644 --- a/development/ChangeLog +++ b/development/ChangeLog @@ -1,3 +1,56 @@ + +2003-12-01 André Pönitz + + * Code_rules/Recommendations: + * Code_rules/Rules: + + try to implement your class in a way that the automatically generated + + copy constructor and copy assignment work out-of-the box. + +Index: Rules +=================================================================== +RCS file: /usr/local/lyx/cvsroot/lyx-devel/development/Code_rules/Rules,v +retrieving revision 1.14 +diff -u -p -r1.14 Rules +--- Rules 25 Sep 2002 14:26:09 -0000 1.14 ++++ Rules 1 Dec 2003 13:48:53 -0000 +@@ -247,20 +247,6 @@ Formatting + -NOT- + void mangle () // wrong + +-* Use of braces +- +- We use braces a lot, even if this lowers the density of the code in +- some cases. In particular we use braces for one-liners in relation +- to if, while, etc. +- +- if (true) { +- do_that(); +- } +- -NOT- +- if (true) +- do_that(); +- +- + * Enumerators + enum { + one = 1, +@@ -293,12 +279,9 @@ Formatting + + * Formatting + +- - Please adapt the formatting of your code to the setting in LyX in that +- particular file. Lars and Asger are slowly, but surely moving the source +- towards Linux kernel style formatting, aka K&R style. We suggest that you +- also do this, but this is NOT something that has been decided generally. +- (a pity - jbl) +- ++ - Adapt the formatting of your code to the one used in the ++ other parts of LyX. In case there is different formatting for ++ the same construct, use the one used more often. + + * Use existing structures + + 2003-11-05 Joăo Luis M. Assirati * lyxsocket/lyxclient.man: a man page for lyxclient. diff --git a/development/Code_rules/Recommendations b/development/Code_rules/Recommendations index ae1ef292e9..64219f8598 100644 --- a/development/Code_rules/Recommendations +++ b/development/Code_rules/Recommendations @@ -14,7 +14,7 @@ follow these rules, but they should be the goal. operator for all classes with dynamically allocated memory that do not inherit noncopyable -- make destructors virtual in base classes. +- make destructors virtual in base classes and only there. - assign to all data members in operator=. @@ -59,8 +59,13 @@ Design. Addison-Wesley, 1992 ================================== -And one of mine: (Lgb) +And one of mine: (Lgb) - When swiching on enums, refrain from using "default:" if possible. +And one of mine: (Andre') + +- try to implement your class in a way that the automatically generated + copy constructor and copy assignment work out-of-the box. + diff --git a/development/Code_rules/Rules b/development/Code_rules/Rules index 5438a5aecc..2f588ce63b 100644 --- a/development/Code_rules/Rules +++ b/development/Code_rules/Rules @@ -247,20 +247,6 @@ Formatting -NOT- void mangle () // wrong -* Use of braces - - We use braces a lot, even if this lowers the density of the code in - some cases. In particular we use braces for one-liners in relation - to if, while, etc. - - if (true) { - do_that(); - } - -NOT- - if (true) - do_that(); - - * Enumerators enum { one = 1, @@ -293,12 +279,9 @@ Formatting * Formatting - - Please adapt the formatting of your code to the setting in LyX in that - particular file. Lars and Asger are slowly, but surely moving the source - towards Linux kernel style formatting, aka K&R style. We suggest that you - also do this, but this is NOT something that has been decided generally. - (a pity - jbl) - + - Adapt the formatting of your code to the one used in the + other parts of LyX. In case there is different formatting for + the same construct, use the one used more often. * Use existing structures