From 6f6648a35c3d8dffd3920883bc19a606cb8f5bd1 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 27 May 2024 11:24:09 +1000 Subject: [PATCH] AP_AIS: use NEW_NOTHROW for new(std::nothrow) --- libraries/AP_AIS/AP_AIS.cpp | 2 +- libraries/AP_AIS/AP_AIS.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/AP_AIS/AP_AIS.cpp b/libraries/AP_AIS/AP_AIS.cpp index a47c57ee6f..afb141ec53 100644 --- a/libraries/AP_AIS/AP_AIS.cpp +++ b/libraries/AP_AIS/AP_AIS.cpp @@ -285,7 +285,7 @@ void AP_AIS::buffer_shift(uint8_t i) ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Functions related to the vessel list -// find vessel index in existing list, if not then return new index if possible +// find vessel index in existing list, if not then return NEW_NOTHROW index if possible bool AP_AIS::get_vessel_index(uint32_t mmsi, uint16_t &index, uint32_t lat, uint32_t lon) { const uint16_t list_size = _list.max_items(); diff --git a/libraries/AP_AIS/AP_AIS.h b/libraries/AP_AIS/AP_AIS.h index d55a08c82f..2d81c37d1d 100644 --- a/libraries/AP_AIS/AP_AIS.h +++ b/libraries/AP_AIS/AP_AIS.h @@ -97,7 +97,7 @@ private: // removed the given index from the AIVDM buffer shift following elements void buffer_shift(uint8_t i); - // find vessel in existing list, if not then return new index if possible + // find vessel in existing list, if not then return NEW_NOTHROW index if possible bool get_vessel_index(uint32_t mmsi, uint16_t &index, uint32_t lat = 0, uint32_t lon = 0) WARN_IF_UNUSED; void clear_list_item(uint16_t index);