From 242a3741e3c5c352128d930bce4325e2718ad4a3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:13 +1000 Subject: [PATCH] AP_NavEKF: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_NavEKF/tests/test_ring_buffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_NavEKF/tests/test_ring_buffer.cpp b/libraries/AP_NavEKF/tests/test_ring_buffer.cpp index e61840469d..5157154625 100644 --- a/libraries/AP_NavEKF/tests/test_ring_buffer.cpp +++ b/libraries/AP_NavEKF/tests/test_ring_buffer.cpp @@ -128,7 +128,7 @@ TEST(ekf_imu_buffer, one_element_case) struct element { uint8_t value; }; - ekf_imu_buffer *b = new ekf_imu_buffer(sizeof(element)); + ekf_imu_buffer *b = NEW_NOTHROW ekf_imu_buffer(sizeof(element)); b->init(1); // 1 element EXPECT_EQ(b->is_filled(), false); EXPECT_EQ(b->get_oldest_index(), b->get_youngest_index()); @@ -157,7 +157,7 @@ TEST(ekf_imu_buffer, is_filled) struct element { uint8_t value; }; - ekf_imu_buffer *b = new ekf_imu_buffer(sizeof(element)); + ekf_imu_buffer *b = NEW_NOTHROW ekf_imu_buffer(sizeof(element)); b->init(4); // 4 elements const element e { 34 };