]> git.lyx.org Git - lyx.git/blobdiff - development/Code_rules/Recommendations
ws change
[lyx.git] / development / Code_rules / Recommendations
index b78d2926bfa3b6df72d352f3c4dbe32b20e1bce9..ae1ef292e99826a73371604ffb0dc2246fcc0823 100644 (file)
@@ -1,5 +1,5 @@
 These are some rules for effective C++ programming. These are taken from 
-Scott Meyers, and is presented in their short form. These are not all the 
+Scott Meyers, and are presented in their short form. These are not all the 
 rules Meyers presents, only the most important of them. LyX does not yet 
 follow these rules, but they should be the goal.
 
@@ -8,10 +8,11 @@ follow these rules, but they should be the goal.
 - Use the same form in corresponding calls to new and delete,
   i.e. write delete[] obj; if new obj[n]; was used to create
   the object and write delete obj; if you wrote new obj;
-  Notice strings should be LString's instead of char *'s.
+  Notice strings should be std::string's instead of char *'s.
 
-- Define a copy constructor and an assignment operator for all
-  classes with dynamically allocated memory.
+- Define a default constructor, copy constructor and an assignment
+  operator for all classes with dynamically allocated memory that
+  do not inherit noncopyable
 
 - make destructors virtual in base classes.
 
@@ -49,6 +50,8 @@ follow these rules, but they should be the goal.
 
 - ensure that global objects are initialized before they are used.
 
+- avoid conditions to 'if' and 'while' that span more than a line
+
 --------
 
 S. Meyers. Effective C++, 50 Specific Ways to Improve Your Programs and