From a535e00ca0fc7af1a8e5ef479ed4026278157e83 Mon Sep 17 00:00:00 2001 From: Pablo Hoch Date: Tue, 24 May 2022 14:13:17 +0200 Subject: [PATCH] fix utl::get_or_create errors --- base/loader/src/timezone_util.cc | 6 ++++-- libs/path/src/path_database_query.cc | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/base/loader/src/timezone_util.cc b/base/loader/src/timezone_util.cc index 54ece3495..19692a442 100644 --- a/base/loader/src/timezone_util.cc +++ b/base/loader/src/timezone_util.cc @@ -22,8 +22,10 @@ timezone_name_idx tz_cache::lookup_name(std::string_view timezone_name) { } else { prev_name_ = timezone_name; return prev_name_idx_ = - utl::get_or_create(timezone_name_idx_, timezone_name, - [&]() { return timezone_name_idx_.size(); }); + utl::get_or_create(timezone_name_idx_, timezone_name, [&]() { + return static_cast( + timezone_name_idx_.size()); + }); } } diff --git a/libs/path/src/path_database_query.cc b/libs/path/src/path_database_query.cc index 7ddbfc655..b3adc6f1d 100644 --- a/libs/path/src/path_database_query.cc +++ b/libs/path/src/path_database_query.cc @@ -115,10 +115,12 @@ void path_database_query::resolve_sequences_and_build_subqueries( for (auto j = 0ULL; j < segment->hints_rle()->Get(i + 1); ++j) { auto feature_id = segment->features()->Get(k); + auto const abs_feature_id = + static_cast(std::abs(feature_id)); auto* resolvable = - utl::get_or_create(subquery.map_, std::abs(feature_id), [&] { + utl::get_or_create(subquery.map_, abs_feature_id, [&] { auto r = std::make_unique(); - r->feature_id_ = std::abs(feature_id); + r->feature_id_ = abs_feature_id; return subquery.mem_.emplace_back(std::move(r)).get(); });