--------------------------
- Function call should have no spaces around parentheses and have spaces after commas: **someFunc(arg1, arg2);**
-- **if**, **while**, **for** should have space after reserved word: **if (cond)** **while (cond)** **for (cond)**
+- **if**, **while**, **for** should have space after reserved word: **if (cond)**, **while (cond)**, **for (cond)**
+- **else**, **catch** key words should be placed on the same line as closing code block brace:
+
+.. code-block:: c++
+
+ if (cond1) {
+ doThis();
+ } else if (cond2) {
+ doThat();
+ } else {
+ getConfused();
+ }
+
+.. code-block:: c++
+
+ try {
+ doThis();
+ } catch (PassException& e) {
+ doThat();
+ } catch (OtherException& e) {
+ doABarrelRoll();
+ }
+
- **switch** should always have **default** case, if all cases are checked and **default** is redundant, place **assert(false)** in it
- Avoid redundant braces inside switch **case**
- **case** labels should be indented by 2 spaces relative to **switch**
else
b = that;
-
.. code-block:: c++
switch(cond) {