User Tools

Site Tools


Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
cppdev:codingconventions [2009-07-04 13:39]
127.0.0.1 external edit
cppdev:codingconventions [2013-01-07 12:07] (current)
Line 1: Line 1:
-====== ​Cafu Coding Conventions ======+====== Coding Conventions ======
  
-This chapter outlines the basic styles and patterns that are used throughout the Cafu code base.+This chapter outlines the basic styles and patterns that are used throughout the Cafu source ​code.
  
 These guidelines intend to achieve uniform code that is easy to read and maintain by many persons, and should be applied to all newly written code. These guidelines intend to achieve uniform code that is easy to read and maintain by many persons, and should be applied to all newly written code.
Line 148: Line 148:
   * with comparison operators (e.g. ''​=='',​ ''>'',​ ''>​='',​ etc.),   * with comparison operators (e.g. ''​=='',​ ''>'',​ ''>​='',​ etc.),
   * with other operators like ''​=''​ (assignment),​ ''::''​ (scope resolution),​ ''​%%->​%%''​ (member by pointer), etc.   * with other operators like ''​=''​ (assignment),​ ''::''​ (scope resolution),​ ''​%%->​%%''​ (member by pointer), etc.
 +Not using whitespace around the above mentioned operators (all but unary) works best when your code editor supports syntax highlighting that renders the operators in a style or color that is different from that of the operands. If your code editor doesn'​t support highlighting of operators and/or using a space before and after the operator improves the readability of the code, using such whitespace is fine, too.
  
 //Use// whitespace //Use// whitespace
cppdev/codingconventions.1246707593.txt.gz ยท Last modified: 2013-01-07 12:07 (external edit)