From 33911c179f4714c743a0544205de2ecfeb3dfc80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Mon, 14 Oct 2024 21:49:04 +0200 Subject: [PATCH 1/3] zlib -> zlib-ng --- .pkg | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pkg b/.pkg index 8754d9f..62f3084 100644 --- a/.pkg +++ b/.pkg @@ -1,7 +1,7 @@ [boost] url=git@github.com:motis-project/boost.git branch=master - commit=60cae66449fa3c9599b2b7d3d5d44c65301ed3a3 + commit=73549ebca677fe6214202a1ab580362b4f80e653 [osmium] url=git@github.com:motis-project/libosmium.git branch=master @@ -30,10 +30,10 @@ url=git@github.com:motis-project/protozero.git branch=master commit=8c9f3fa97c2cfdceef86d0b61818ae98e9328f29 -[zlib] - url=git@github.com:motis-project/zlib.git - branch=master - commit=8e7c86d3a0e49101b9a67d74c4a07345dcb0e485 +[zlib-ng] + url=git@github.com:motis-project/zlib-ng.git + branch=develop + commit=68ab3e2d80253ec5dc3c83691d9ff70477b32cd3 [tiles] url=git@github.com:motis-project/tiles.git branch=master @@ -65,4 +65,4 @@ [net] url=git@github.com:motis-project/net.git branch=master - commit=44674d2f3917e20b7019a0f7254d332522c36fb7 + commit=75611343512242c64a5b3f50f3a660a17298339d From 7804baa183625fd06a3083f95bd1178f5b8162d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Mon, 21 Oct 2024 15:17:06 +0200 Subject: [PATCH 2/3] fix osr-backend --- .pkg | 4 ++-- exe/backend/src/http_server.cc | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.pkg b/.pkg index 62f3084..82de56f 100644 --- a/.pkg +++ b/.pkg @@ -17,7 +17,7 @@ [cista] url=git@github.com:felixguendling/cista.git branch=master - commit=777618a9a96a9bfbf44edc64686c0c17eb1afd05 + commit=5b2ca78d1af99941ea41e195dc3a29b4f05e1b77 [googletest] url=git@github.com:motis-project/googletest.git branch=master @@ -37,7 +37,7 @@ [tiles] url=git@github.com:motis-project/tiles.git branch=master - commit=649e1c190e63b2d0de5cbc693093355fa0476010 + commit=f7208d4e05661abbf09e4f284de0112a445f6b0a [mimalloc] url=git@github.com:motis-project/mimalloc.git branch=master diff --git a/exe/backend/src/http_server.cc b/exe/backend/src/http_server.cc index 8e37ed0..f1b35ca 100644 --- a/exe/backend/src/http_server.cc +++ b/exe/backend/src/http_server.cc @@ -210,9 +210,12 @@ struct http_server::impl { void handle_static(web_server::http_req_t const& req, web_server::http_res_cb_t const& cb) { - if (!serve_static_files_ || - !net::serve_static_file(static_file_path_, req, cb)) { - return cb(net::not_found_response(req)); + if (auto res = net::serve_static_file(static_file_path_, req); + res.has_value()) { + cb(std::move(*res)); + } else { + namespace http = boost::beast::http; + cb(net::web_server::string_res_t{http::status::not_found, req.version()}); } } From 39f64708e070012e3796f8637bbd79b0c13a481f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Felix=20G=C3=BCndling?= Date: Mon, 21 Oct 2024 15:17:25 +0200 Subject: [PATCH 3/3] make to_float(level) handle invalid --- include/osr/types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/osr/types.h b/include/osr/types.h index bbff37d..743a23c 100644 --- a/include/osr/types.h +++ b/include/osr/types.h @@ -142,7 +142,7 @@ constexpr level_t to_level(float const f) { } constexpr float to_float(level_t const l) { - return kMinLevel + (to_idx(l) / 4.0F); + return l == level_t::invalid() ? 0.0F : (kMinLevel + (to_idx(l) / 4.0F)); } constexpr auto const kLevelBits = cista::constexpr_trailing_zeros(