AP_WheelEncoder: use NEW_NOTHROW for new(std::nothrow)
This commit is contained in:
parent
659ecf6159
commit
20a5ec4348
@ -168,13 +168,13 @@ void AP_WheelEncoder::init(void)
|
||||
|
||||
case WheelEncoder_TYPE_QUADRATURE:
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_CHIBIOS
|
||||
drivers[i] = new AP_WheelEncoder_Quadrature(*this, i, state[i]);
|
||||
drivers[i] = NEW_NOTHROW AP_WheelEncoder_Quadrature(*this, i, state[i]);
|
||||
#endif
|
||||
break;
|
||||
|
||||
case WheelEncoder_TYPE_SITL_QUADRATURE:
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
drivers[i] = new AP_WheelEncoder_SITL_Quadrature(*this, i, state[i]);
|
||||
drivers[i] = NEW_NOTHROW AP_WheelEncoder_SITL_Quadrature(*this, i, state[i]);
|
||||
#endif
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user