From b8eab36298d486ef4ad22e95bee15896ec7d3857 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:09 +1000 Subject: [PATCH] AP_ADC: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_ADC/AP_ADC_ADS1115.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_ADC/AP_ADC_ADS1115.cpp b/libraries/AP_ADC/AP_ADC_ADS1115.cpp index 21f124a88d..96ab43244f 100644 --- a/libraries/AP_ADC/AP_ADC_ADS1115.cpp +++ b/libraries/AP_ADC/AP_ADC_ADS1115.cpp @@ -113,7 +113,7 @@ AP_ADC_ADS1115::AP_ADC_ADS1115() , _gain(ADS1115_PGA_4P096) , _channel_to_read(0) { - _samples = new adc_report_s[_channels_number]; + _samples = NEW_NOTHROW adc_report_s[_channels_number]; } AP_ADC_ADS1115::~AP_ADC_ADS1115()