GUIDELINES: add an explicit-this rule
Related-To: NEO-6789 Signed-off-by: Maciej Bielski <maciej.bielski@intel.com>
This commit is contained in:
parent
cd95572443
commit
b7f516982b
|
@ -1,6 +1,6 @@
|
||||||
<!---
|
<!---
|
||||||
|
|
||||||
Copyright (C) 2018-2021 Intel Corporation
|
Copyright (C) 2018-2022 Intel Corporation
|
||||||
|
|
||||||
SPDX-License-Identifier: MIT
|
SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
@ -18,6 +18,7 @@ File to cover guidelines for NEO project.
|
||||||
* avoid includes in headers unless absolutely necessary
|
* avoid includes in headers unless absolutely necessary
|
||||||
* use of exceptions in driver code needs strong justification
|
* use of exceptions in driver code needs strong justification
|
||||||
* prefer static create methods returning std::unique_ptr instead of throwing from constructor
|
* prefer static create methods returning std::unique_ptr instead of throwing from constructor
|
||||||
|
* inside methods, use an explicit `this->` pointer for refering to non-static class members
|
||||||
|
|
||||||
# Naming conventions
|
# Naming conventions
|
||||||
|
|
||||||
|
@ -62,4 +63,4 @@ a general rule test shouldn't be longer then 1ms in Debug driver.
|
||||||
* Do not use `TODO`s in the code
|
* Do not use `TODO`s in the code
|
||||||
* Use `UNRECOVERABLE_IF` and `DEBUG_BREAK_IF` instead of `asserts`:
|
* Use `UNRECOVERABLE_IF` and `DEBUG_BREAK_IF` instead of `asserts`:
|
||||||
* Use `UNRECOVERABLE_IF` when a failure is found and driver cannot proceed with normal execution. `UNRECOVERABLE_IF` is implemented in Release and Debug builds.
|
* Use `UNRECOVERABLE_IF` when a failure is found and driver cannot proceed with normal execution. `UNRECOVERABLE_IF` is implemented in Release and Debug builds.
|
||||||
* Use `DEBUG_BREAK_IF` when a failure can be handled gracefully by the driver and it can continue with normal execution. `DEBUG_BREAK_IF` is only implemented in Debug builds.
|
* Use `DEBUG_BREAK_IF` when a failure can be handled gracefully by the driver and it can continue with normal execution. `DEBUG_BREAK_IF` is only implemented in Debug builds.
|
||||||
|
|
Loading…
Reference in New Issue