Skip to content

Commit

Permalink
eckit::geo fix Spec defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaciel committed Nov 21, 2024
1 parent 199c85a commit 3caa96d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/eckit/geo/Spec.cc
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ namespace eckit::geo {


template <typename T>
static T _get_d(const Spec& spec, const std::string& name, const T& _default) {
static inline T _get_d(const Spec& spec, const std::string& name, const T& _default) {
T value{_default};
spec.get(name, value);
spec.has(name) && spec.get(name, value);
return value;
}


template <typename T>
static T _get_t(const Spec& spec, const std::string& name) {
static inline T _get_t(const Spec& spec, const std::string& name) {
T value{};
return spec.get(name, value) ? value : throw SpecNotFound(name, Here());
}
Expand Down

0 comments on commit 3caa96d

Please sign in to comment.