mirror of https://github.com/ArduPilot/ardupilot
AP_HAL: introduce get_HAL_mutable() to complement get_HAL()
Returns a mutable reference to the same HAL for certain purposes where the HAL needs to be mutated to avoid UB problems with casting away const and to make the fact that mutation is happening obvious.
This commit is contained in:
parent
c48feefe23
commit
dc76e03890
|
@ -67,6 +67,7 @@ namespace AP_HAL {
|
|||
|
||||
class SIMState;
|
||||
|
||||
// Must be implemented by the concrete HALs.
|
||||
// Must be implemented by the concrete HALs and return the same reference.
|
||||
const HAL& get_HAL();
|
||||
HAL& get_HAL_mutable();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue