From beaaeea3613b7c9fe43f54f621fe8c38691d3d45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20K=C3=BCppers?= Date: Thu, 2 Jan 2025 19:06:17 +0100 Subject: [PATCH] rename to throwIfNotPresent --- etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/checks.h | 2 +- .../include/etsi_its_msgs_utils/impl/mapem/mapem_ts_getters.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/checks.h b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/checks.h index 4090a4ae..148d051d 100644 --- a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/checks.h +++ b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/checks.h @@ -39,7 +39,7 @@ void throwIfOutOfRange(const T1& val, const T2& min, const T2& max, const std::s std::to_string(max) + ")!"); } -inline void throwIfNotIsPresent(const bool is_present, const std::string val_desc) { +inline void throwIfNotPresent(const bool is_present, const std::string val_desc) { if (!is_present) throw std::invalid_argument(val_desc + " is not present!"); } diff --git a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/mapem/mapem_ts_getters.h b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/mapem/mapem_ts_getters.h index 297268e3..c44a4280 100644 --- a/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/mapem/mapem_ts_getters.h +++ b/etsi_its_msgs_utils/include/etsi_its_msgs_utils/impl/mapem/mapem_ts_getters.h @@ -45,7 +45,7 @@ namespace access { * @return MinuteOfTheYear the minute of the year object */ inline MinuteOfTheYear getMinuteOfTheYear(const MapData& map) { - throwIfNotIsPresent(map.time_stamp_is_present, "mapem.map.time_stamp"); + throwIfNotPresent(map.time_stamp_is_present, "mapem.map.time_stamp"); return map.time_stamp; } @@ -157,7 +157,7 @@ namespace access { * @return Elevation value (above the reference ellipsoid surface) in meter as decimal number */ inline double getElevation(const Position3D& ref_point) { - throwIfNotIsPresent(ref_point.elevation_is_present, "Position3D.elevation_is_present"); + throwIfNotPresent(ref_point.elevation_is_present, "Position3D.elevation_is_present"); return getElevation(ref_point.elevation); }