mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-11-14 12:02:38 +08:00
AP_HAL_ChibiOS: use NEW_NOTHROW for new(std::nothrow)
This commit is contained in:
1 parent
375eab8560
commit
8dbad82c8a
12 files changed
+19
-19
No files matched your search
@@ -52,7 +52,7 @@ extern const AP_HAL::HAL& hal;
|
||||
// initialize the FFT state machine
|
||||
AP_HAL::DSP::FFTWindowState* DSP::fft_init(uint16_t window_size, uint16_t sample_rate, uint8_t sliding_window_size)
|
||||
{
|
||||
DSP::FFTWindowStateARM* fft = new DSP::FFTWindowStateARM(window_size, sample_rate, sliding_window_size);
|
||||
DSP::FFTWindowStateARM* fft = NEW_NOTHROW DSP::FFTWindowStateARM(window_size, sample_rate, sliding_window_size);
|
||||
if (fft == nullptr || fft->_hanning_window == nullptr || fft->_rfft_data == nullptr || fft->_freq_bins == nullptr || fft->_derivative_freq_bins == nullptr) {
|
||||
delete fft;
|
||||
return nullptr;
|
||||
|
||||
Reference in new issue
Block a user