AP_AIS: use NEW_NOTHROW for new(std::nothrow)

This commit is contained in:
Andrew Tridgell 2024-05-27 11:24:09 +10:00
parent 8fdf085e2f
commit 6f6648a35c
2 changed files with 2 additions and 2 deletions

View File

@ -285,7 +285,7 @@ void AP_AIS::buffer_shift(uint8_t i)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Functions related to the vessel list // 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) 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(); const uint16_t list_size = _list.max_items();

View File

@ -97,7 +97,7 @@ private:
// removed the given index from the AIVDM buffer shift following elements // removed the given index from the AIVDM buffer shift following elements
void buffer_shift(uint8_t i); 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; 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); void clear_list_item(uint16_t index);