Browse Source

Update CONTRIBUTING.md

C++ conversion - good
C-Style cast - bad
pull/2172/merge
Don HO 8 years ago committed by GitHub
parent
commit
40509ccb3d
  1. 12
      CONTRIBUTING.md

12
CONTRIBUTING.md

@ -176,6 +176,18 @@ Function names are not separated from the first parenthesis.</h5>
``` ```
1. ##### Always use `C++ conversion` instead of `C-Style cast`. Generally, all the conversion among types should be avoided. If you have no choice, use C++ conversion.
* ###### Good:
```cpp
char aChar = static_cast<char>(_pEditView->execute(SCI_GETCHARAT, j));
```
* ###### Bad:
```cpp
char aChar = (char)_pEditView->execute(SCI_GETCHARAT, j);
```
#### NAMING CONVENTIONS #### NAMING CONVENTIONS

Loading…
Cancel
Save