mirror of https://github.com/ArduPilot/ardupilot
AP_HAL_Linux: 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
db12f428c5
commit
8fe95dca81
|
@ -491,3 +491,8 @@ const AP_HAL::HAL &AP_HAL::get_HAL()
|
|||
{
|
||||
return hal_linux;
|
||||
}
|
||||
|
||||
AP_HAL::HAL &AP_HAL::get_HAL_mutable()
|
||||
{
|
||||
return hal_linux;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue