Changeset 49 in pacpusframework


Ignore:
Timestamp:
01/09/13 08:57:11 (11 years ago)
Author:
Marek Kurdej
Message:

Coding style: curly brackets.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/CODING_STYLE.txt

    r41 r49  
    1818    #endif // PACPUS_EXAMPLE_H
    1919* use C++-style comments (//)
     20* ALWAYS use curly brackets with statements if, for, etc.
     21* use curly brackets {} as follows:
     22    * on the same line with:
     23        - namespace {
     24        - statements if, for, etc.
     25            if (cond) {
     26            } else if (cond2) {
     27            } else {
     28            }
     29    * on the next line with:
     30        - classes
     31        - function and method definitions
     32        - local scope blocks
     33            class A
     34            {
     35                void fun A;
     36               
     37                struct AB
     38                {
     39                };
     40               
     41                void fun A
     42                {
     43                }
     44            };
    2045* write Doxygen-style comments as much as possible, put it in the header file if possible, add developer-only comments in source file
    2146* use Java-style Doxygen comments, i.e. @returns over \returns
     
    6388    int mMemberA;
    6489};
     90
    6591} // namespace pacpus
    6692
     
    87113{
    88114    int someIntegerVariable;
     115   
     116    if (a) {
     117        a();
     118    } else {
     119        b();
     120    }
     121   
     122    if (isConditionSatisfied()) {
     123        doSomething();
     124        return 0;
     125    }
     126    return 1;
    89127}
Note: See TracChangeset for help on using the changeset viewer.