AC_CustomControl: use NEW_NOTHROW for new(std::nothrow)

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:08 +10:00
parent c36c37099d
commit 18e5da78d2
1 changed files with 2 additions and 2 deletions

View File

@ -55,11 +55,11 @@ void AC_CustomControl::init(void)
break;
case CustomControlType::CONT_EMPTY: // This is template backend. Don't initialize it.
// This is template backend. Don't initialize it.
// _backend = new AC_CustomControl_Empty(*this, _ahrs, _att_control, _motors, _dt);
// _backend = NEW_NOTHROW AC_CustomControl_Empty(*this, _ahrs, _att_control, _motors, _dt);
// _backend_var_info[get_type()] = AC_CustomControl_Empty::var_info;
break;
case CustomControlType::CONT_PID:
_backend = new AC_CustomControl_PID(*this, _ahrs, _att_control, _motors, _dt);
_backend = NEW_NOTHROW AC_CustomControl_PID(*this, _ahrs, _att_control, _motors, _dt);
_backend_var_info[get_type()] = AC_CustomControl_PID::var_info;
break;
default: