From c70c8657bcd2a2281a23145c2046de9bf326ecbd Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:11 +1000 Subject: [PATCH] AP_Generator: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_Generator/AP_Generator.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/AP_Generator/AP_Generator.cpp b/libraries/AP_Generator/AP_Generator.cpp index d5cfca045d2..f1906bdc8fb 100644 --- a/libraries/AP_Generator/AP_Generator.cpp +++ b/libraries/AP_Generator/AP_Generator.cpp @@ -67,19 +67,19 @@ void AP_Generator::init() #if AP_GENERATOR_IE_650_800_ENABLED case Type::IE_650_800: - _driver_ptr = new AP_Generator_IE_650_800(*this); + _driver_ptr = NEW_NOTHROW AP_Generator_IE_650_800(*this); break; #endif #if AP_GENERATOR_IE_2400_ENABLED case Type::IE_2400: - _driver_ptr = new AP_Generator_IE_2400(*this); + _driver_ptr = NEW_NOTHROW AP_Generator_IE_2400(*this); break; #endif #if AP_GENERATOR_RICHENPOWER_ENABLED case Type::RICHENPOWER: - _driver_ptr = new AP_Generator_RichenPower(*this); + _driver_ptr = NEW_NOTHROW AP_Generator_RichenPower(*this); break; #endif }