mirror of
https://github.com/cpp-best-practices/cppbestpractices.git
synced 2025-12-17 11:14:35 +03:00
Add note on avoiding boolean parameters
This commit is contained in:
@@ -21,7 +21,11 @@ namespace my_project {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Consider Avoiding Boolean Parameters
|
||||||
|
|
||||||
|
They do not provide any additional meaning while reading the code. You can either create a separate function that has a more meaningful name, or pass an enumeration that makes the meaning more clear.
|
||||||
|
|
||||||
|
See http://mortoray.com/2015/06/15/get-rid-of-those-boolean-function-parameters/ for more information.
|
||||||
|
|
||||||
## Avoid Raw Loops
|
## Avoid Raw Loops
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user