diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e09f079ee..624483264 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -176,6 +176,18 @@ Function names are not separated from the first parenthesis. ``` +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(_pEditView->execute(SCI_GETCHARAT, j)); + ``` + + * ###### Bad: + ```cpp + char aChar = (char)_pEditView->execute(SCI_GETCHARAT, j); + ``` + #### NAMING CONVENTIONS