... | @@ -21,6 +21,7 @@ Recursive code is hard to read and debug, and can easy lead to stack overflow er |
... | @@ -21,6 +21,7 @@ Recursive code is hard to read and debug, and can easy lead to stack overflow er |
|
- **Every class with a virtual function shall define a virtual destructor**
|
|
- **Every class with a virtual function shall define a virtual destructor**
|
|
Avoid undefined behavior where a derived class is destroyed through a reference to the base class, possibly leaking resources.
|
|
Avoid undefined behavior where a derived class is destroyed through a reference to the base class, possibly leaking resources.
|
|
- **Every header file shall be guarded using defines containing the full project path of the file**
|
|
- **Every header file shall be guarded using defines containing the full project path of the file**
|
|
|
|
Avoid conflicts when having files with the same name in multiple directories.
|
|
Example: File `src/shared/sensors/ExampleSensor.h`
|
|
Example: File `src/shared/sensors/ExampleSensor.h`
|
|
```
|
|
```
|
|
#ifndef SRC_SHARED_SENSORS_EXAMPLESENSOR_H
|
|
#ifndef SRC_SHARED_SENSORS_EXAMPLESENSOR_H
|
... | | ... | |