Skip to content

Commit

Permalink
Merge branch 'master' of github.com:motis-project/osr
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Oct 22, 2024
2 parents 055b14b + 39f6470 commit 257d860
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 12 deletions.
16 changes: 8 additions & 8 deletions .pkg
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -30,14 +30,14 @@
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
commit=649e1c190e63b2d0de5cbc693093355fa0476010
commit=f7208d4e05661abbf09e4f284de0112a445f6b0a
[mimalloc]
url=git@github.com:motis-project/mimalloc.git
branch=master
Expand Down Expand Up @@ -65,4 +65,4 @@
[net]
url=git@github.com:motis-project/net.git
branch=master
commit=44674d2f3917e20b7019a0f7254d332522c36fb7
commit=75611343512242c64a5b3f50f3a660a17298339d
9 changes: 6 additions & 3 deletions exe/backend/src/http_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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()});
}
}

Expand Down
2 changes: 1 addition & 1 deletion include/osr/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,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(
Expand Down

0 comments on commit 257d860

Please sign in to comment.