diff --git a/src/metkit/mars/StepRange.cc b/src/metkit/mars/StepRange.cc index eb98104..c8b8c3d 100644 --- a/src/metkit/mars/StepRange.cc +++ b/src/metkit/mars/StepRange.cc @@ -23,25 +23,25 @@ using namespace eckit; namespace { -enum TimeUnit { - Second = 0, - Minute = 1, - Hour = 2, - Day = 3 -}; - -TimeUnit maxUnit(const eckit::Time& t) { - if (t.seconds() == 0) { - if (t.minutes() == 0) { - if (t.hours() == 0) { - return TimeUnit::Day; - } - return TimeUnit::Hour; - } - return TimeUnit::Minute; - } - return TimeUnit::Second; -} +// enum TimeUnit { +// Second = 0, +// Minute = 1, +// Hour = 2, +// Day = 3 +// }; + +// TimeUnit maxUnit(const eckit::Time& t) { +// if (t.seconds() == 0) { +// if (t.minutes() == 0) { +// if (t.hours() == 0) { +// return TimeUnit::Day; +// } +// return TimeUnit::Hour; +// } +// return TimeUnit::Minute; +// } +// return TimeUnit::Second; +// } std::string canonical(const eckit::Time& time) { @@ -65,24 +65,23 @@ std::string canonical(const eckit::Time& time) { return out; } -std::string canonical(const eckit::Time& time, TimeUnit unit) { - switch (unit) { - case TimeUnit::Second: - return std::to_string(time.seconds()+60*time.minutes()+3600*time.hours()) + "s"; - case TimeUnit::Minute: - return std::to_string(time.minutes()+60*time.hours()) + "m"; - case TimeUnit::Day: - case TimeUnit::Hour: - default: - return std::to_string(time.hours()); - } -} +// std::string canonical(const eckit::Time& time, TimeUnit unit) { +// switch (unit) { +// case TimeUnit::Second: +// return std::to_string(time.seconds()+60*time.minutes()+3600*time.hours()) + "s"; +// case TimeUnit::Minute: +// return std::to_string(time.minutes()+60*time.hours()) + "m"; +// case TimeUnit::Day: +// case TimeUnit::Hour: +// default: +// return std::to_string(time.hours()); +// } +// } } namespace metkit::mars { - //---------------------------------------------------------------------------------------------------------------------- StepRange::operator std::string() const diff --git a/src/tools/bufr-sanity-check.cc b/src/tools/bufr-sanity-check.cc index 9fa56e3..c2e4b4f 100644 --- a/src/tools/bufr-sanity-check.cc +++ b/src/tools/bufr-sanity-check.cc @@ -380,7 +380,7 @@ void BufrCheck::process(const PathName& input, const PathName& output) { numMessage++; } } - catch(eckit::Exception e) { + catch(eckit::Exception& e) { Log::warning() << " Error parsing message " << numMessage << " - offset " << pos << std::endl; if (verbose_) { e.dumpStackTrace(Log::warning());