From c06f8c28e1075c72100d469459928210e10a6183 Mon Sep 17 00:00:00 2001 From: "Cimon Lucas (LCM)" Date: Tue, 21 Jan 2025 17:57:42 +0100 Subject: [PATCH] WIP --- .pkg.mutex | 0 include/nigiri/footpath.h | 3 +-- include/nigiri/loader/hrd/service/expand_local_to_utc.h | 8 ++++++-- include/nigiri/loader/hrd/service/read_services.h | 8 ++++---- src/loader/hrd/stamm/category.cc | 1 + 5 files changed, 12 insertions(+), 8 deletions(-) mode change 100755 => 100644 .pkg.mutex diff --git a/.pkg.mutex b/.pkg.mutex old mode 100755 new mode 100644 diff --git a/include/nigiri/footpath.h b/include/nigiri/footpath.h index cf122031d..5149f197d 100644 --- a/include/nigiri/footpath.h +++ b/include/nigiri/footpath.h @@ -2,12 +2,11 @@ #include "fmt/ostream.h" -#include "utl/verify.h" #include "utl/logging.h" +#include "utl/verify.h" #include "cista/reflection/printable.h" -#include "nigiri/footpath.h" #include "nigiri/types.h" namespace nigiri { diff --git a/include/nigiri/loader/hrd/service/expand_local_to_utc.h b/include/nigiri/loader/hrd/service/expand_local_to_utc.h index e96a2b123..5ac50c543 100644 --- a/include/nigiri/loader/hrd/service/expand_local_to_utc.h +++ b/include/nigiri/loader/hrd/service/expand_local_to_utc.h @@ -1,5 +1,7 @@ #pragma once +#include "utl/logging.h" + #include "nigiri/loader/hrd/service/ref_service.h" #include "nigiri/loader/hrd/service/service.h" #include "nigiri/loader/hrd/stamm/timezone.h" @@ -55,7 +57,8 @@ std::optional build_utc_time_seq( stop_timezones.front(), day, local_times.front(), true); if (!first_valid) { - utl::log_error("loader.hrd.service.utc", + utl::log_error( + "loader.hrd.service.utc", "first departure local to utc failed for {}: local_time={}, day={}", origin, local_times.front(), day); return std::nullopt; @@ -67,7 +70,8 @@ std::optional build_utc_time_seq( auto const [utc_mam, day_offset, valid] = local_mam_to_utc_mam( tz, day + first_day_offset, local_time - first_day_offset); if (day_offset != 0_days || pred > utc_mam || !valid) { - utl::log_error("loader.hrd.service.utc", + utl::log_error( + "loader.hrd.service.utc", "local to utc failed, ignoring: {}, day={}, time={}, offset={}, " "pred={}, utc_mam={}, valid={}", origin, day, local_time, day_offset, pred, utc_mam, valid); diff --git a/include/nigiri/loader/hrd/service/read_services.h b/include/nigiri/loader/hrd/service/read_services.h index 617d9e4fe..c469cc29e 100644 --- a/include/nigiri/loader/hrd/service/read_services.h +++ b/include/nigiri/loader/hrd/service/read_services.h @@ -55,16 +55,16 @@ void parse_services(config const& c, } if (!spec.valid()) { - utl::log_error("loader.hrd.service", - "skipping invalid service at {}:{}", filename, line_number); + utl::log_error("loader.hrd.service", "skipping invalid service at {}:{}", + filename, line_number); } else if (!spec.ignore()) { // Store if relevant. try { expand_service(store.add(service{c, st, source_file_idx, spec})); } catch (std::exception const& e) { utl::log_error("loader.hrd.service.expand", - "unable to build service at {}:{}: {}", filename, line_number, - e.what()); + "unable to build service at {}:{}: {}", filename, + line_number, e.what()); } } diff --git a/src/loader/hrd/stamm/category.cc b/src/loader/hrd/stamm/category.cc index 7095bfac9..6aa088c89 100644 --- a/src/loader/hrd/stamm/category.cc +++ b/src/loader/hrd/stamm/category.cc @@ -3,6 +3,7 @@ #include "nigiri/clasz.h" #include "nigiri/loader/hrd/stamm/category.h" #include "nigiri/loader/hrd/util.h" +#include "nigiri/scoped_timer.h" namespace nigiri::loader::hrd {