From 41cc776bd9b904d83b2f9aea789c1cc0ae856ea3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:12 +1000 Subject: [PATCH] AP_LeakDetector: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_LeakDetector/AP_LeakDetector.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_LeakDetector/AP_LeakDetector.cpp b/libraries/AP_LeakDetector/AP_LeakDetector.cpp index c4973b3a1e..3b39a9a07f 100644 --- a/libraries/AP_LeakDetector/AP_LeakDetector.cpp +++ b/libraries/AP_LeakDetector/AP_LeakDetector.cpp @@ -112,11 +112,11 @@ void AP_LeakDetector::init() switch(_type[i]) { case ANALOG: _state[i].instance = i; - _drivers[i] = new AP_LeakDetector_Analog(*this, _state[i]); + _drivers[i] = NEW_NOTHROW AP_LeakDetector_Analog(*this, _state[i]); break; case DIGITAL: _state[i].instance = i; - _drivers[i] = new AP_LeakDetector_Digital(*this, _state[i]); + _drivers[i] = NEW_NOTHROW AP_LeakDetector_Digital(*this, _state[i]); break; } }