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

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:10 +10:00
parent ed8926361f
commit b07e0bf06b
1 changed files with 8 additions and 8 deletions

View File

@ -98,42 +98,42 @@ void AP_EFI::init(void)
break;
#if AP_EFI_SERIAL_MS_ENABLED
case Type::MegaSquirt:
backend = new AP_EFI_Serial_MS(*this);
backend = NEW_NOTHROW AP_EFI_Serial_MS(*this);
break;
#endif
#if AP_EFI_SERIAL_LUTAN_ENABLED
case Type::Lutan:
backend = new AP_EFI_Serial_Lutan(*this);
backend = NEW_NOTHROW AP_EFI_Serial_Lutan(*this);
break;
#endif
#if AP_EFI_NWPWU_ENABLED
case Type::NWPMU:
backend = new AP_EFI_NWPMU(*this);
backend = NEW_NOTHROW AP_EFI_NWPMU(*this);
break;
#endif
#if AP_EFI_DRONECAN_ENABLED
case Type::DroneCAN:
backend = new AP_EFI_DroneCAN(*this);
backend = NEW_NOTHROW AP_EFI_DroneCAN(*this);
break;
#endif
#if AP_EFI_CURRAWONG_ECU_ENABLED
case Type::CurrawongECU:
backend = new AP_EFI_Currawong_ECU(*this);
backend = NEW_NOTHROW AP_EFI_Currawong_ECU(*this);
break;
#endif
#if AP_EFI_SCRIPTING_ENABLED
case Type::SCRIPTING:
backend = new AP_EFI_Scripting(*this);
backend = NEW_NOTHROW AP_EFI_Scripting(*this);
break;
#endif
#if AP_EFI_SERIAL_HIRTH_ENABLED
case Type::Hirth:
backend = new AP_EFI_Serial_Hirth(*this);
backend = NEW_NOTHROW AP_EFI_Serial_Hirth(*this);
break;
#endif
#if AP_EFI_MAV_ENABLED
case Type::MAV:
backend = new AP_EFI_MAV(*this);
backend = NEW_NOTHROW AP_EFI_MAV(*this);
break;
#endif
default: