mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-06 19:00:27 +08:00
AP_WheelEncoder: use NEW_NOTHROW for new(std::nothrow)
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user