Skip to content

Commit

Permalink
rename to throwIfNotPresent
Browse files Browse the repository at this point in the history
  • Loading branch information
gkueppers committed Jan 2, 2025
1 parent 4ff0c1f commit beaaeea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit beaaeea

Please sign in to comment.