From bac6d6f6443e31fca144b630b7f564db317d7b11 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:09 +1000 Subject: [PATCH] AP_Beacon: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_Beacon/AP_Beacon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_Beacon/AP_Beacon.cpp b/libraries/AP_Beacon/AP_Beacon.cpp index 0a2a04e71c..389fe58a9d 100644 --- a/libraries/AP_Beacon/AP_Beacon.cpp +++ b/libraries/AP_Beacon/AP_Beacon.cpp @@ -98,15 +98,15 @@ void AP_Beacon::init(void) // create backend if (_type == AP_BeaconType_Pozyx) { - _driver = new AP_Beacon_Pozyx(*this); + _driver = NEW_NOTHROW AP_Beacon_Pozyx(*this); } else if (_type == AP_BeaconType_Marvelmind) { - _driver = new AP_Beacon_Marvelmind(*this); + _driver = NEW_NOTHROW AP_Beacon_Marvelmind(*this); } else if (_type == AP_BeaconType_Nooploop) { - _driver = new AP_Beacon_Nooploop(*this); + _driver = NEW_NOTHROW AP_Beacon_Nooploop(*this); } #if CONFIG_HAL_BOARD == HAL_BOARD_SITL if (_type == AP_BeaconType_SITL) { - _driver = new AP_Beacon_SITL(*this); + _driver = NEW_NOTHROW AP_Beacon_SITL(*this); } #endif }