Commit Graph

1657 Commits

Author SHA1 Message Date
Siarhei Fedartsou
523ee762f0
Upgrade to clang-tidy 18 (#6919) 2024-06-06 22:20:38 +02:00
Dennis Luxen
2725202771
Use Lemire's fast check whether to escape a JSON string (#6923) 2024-05-31 19:58:57 +02:00
Siarhei Fedartsou
42fafdcdfe
Use custom struct instead of std::pair in QueryHeap (#6921) 2024-05-31 07:06:58 +02:00
Siarhei Fedartsou
c8de759cd6
Use std::string_view::starts_with instead of boost::starts_with (#6918) 2024-05-30 21:55:25 +02:00
Siarhei Fedartsou
fb9d1cefcc
Get rid of boost::math::constants::* and M_PI in favor of std::numbers (#6916) 2024-05-30 19:40:56 +02:00
Dennis Luxen
a9b1bd88d3
Remove all core-CH left-overs (#6920)
* Remove all core-CH left-overs

* Fix formatting

* Update CHANGELOG.md
2024-05-30 17:13:44 +02:00
Siarhei Fedartsou
1ff096ac5c
Make constants in PackedVector constexpr (#6917) 2024-05-30 15:12:42 +02:00
Dennis Luxen
0ea757ed02
Remove unused header file (#6913) 2024-05-29 09:13:13 +02:00
Siarhei Fedartsou
c1ed73126d
Use std::variant instead of mapbox::util::variant (#6903) 2024-05-28 18:52:49 +02:00
Siarhei Fedartsou
9aaab7a53f
Enable readability-container-contains clang-tidy check (#6909) 2024-05-27 08:33:26 +02:00
Siarhei Fedartsou
1a6f4c44e7
Fix performance-type-promotion-in-math-fn clang-tidy warning (#6908) 2024-05-27 08:33:05 +02:00
Siarhei Fedartsou
b7a990d0b5
Use C++20 (#6877) 2024-05-25 18:25:13 +02:00
Dennis Luxen
8306ed8ae3
Remove superflous iostreams include from header files (#6901) 2024-05-25 09:17:45 +02:00
Dennis Luxen
640df69aa1
Remove dead CRC32 processor code (#6900) 2024-05-24 22:43:03 +02:00
Dennis Luxen
babdced52f
Replace GCC-specific attribute with [[nodiscard]] attribute (#6899) 2024-05-24 20:34:04 +02:00
Siarhei Fedartsou
21607e0cb2
Optimise getNetworkDistance in MLD even more (#6884) 2024-05-23 20:46:13 +02:00
Dennis Luxen
51b74a99aa
Avoid copy of std::function-based callback in path unpacking (#6895)
* Avoid copy of std::function-based callback in path unpacking

* Fix formatting

* Update CHANGELOG.md
2024-05-23 18:51:51 +02:00
Dennis Luxen
46dc660801
Replace boost::hash by std::hash (#6892)
* Replace boost::hash by std::hash

* Fix formatting

* Update CHANGELOG.md
2024-05-23 14:35:56 +02:00
Mugr Rex
efe6840d08
Replace boost::optional with std::optional (#6611) 2024-05-22 14:58:07 +02:00
Siarhei Fedartsou
d259848456
Optimise R-tree queries in the case of map matching (#6881) 2024-05-20 12:32:40 +02:00
Siarhei Fedartsou
ee8e0f890a
Optimise path distance calculation in MLD map matching (#6876) 2024-05-11 16:30:43 +02:00
Michael Bell
ffc39b8ad2
Clarify use of forcing routing steps (#6866)
The change clarifies the conditions for forcing routing steps and
simplifies the codebase to support it.

- Makes explicity  the search runtime condition for forcing a routing
step. Namely, the node is a source of the forward and reverse searches,
and it's one of the pre-identified nodes that requires a step to
be forced.
- Consolidate the two lists of force nodes into one. Not only is there
no algorithmic value in separating the nodes by geometric direction,
the  improvements to via-routes with u-turns mean atleast one of these
lists will be empty for any search.
- Rename 'force loop' to 'force step'. This moves the code away
from the original CH-specific language for checking for self-loops
in the case where this condition is met. MLD does not have loops.

Additional cucumber tests are added to cover the logic related to
negative search weights and forcing routing steps on via-route
paths.
2024-05-10 22:00:24 +01:00
Dennis Luxen
70969186f6
Migrate GCC CI jobs to run on GCC 11, 12, and 13 (#6865) 2024-05-10 20:38:32 +02:00
Dennis Luxen
dff76d31d5
Remove dead code branches (#6875) 2024-05-10 20:21:41 +02:00
Dennis Luxen
0583582772
Remove include that breaks compilation for Boost v1.85.0 (#6856)
* Remove include that breaks compilation for Boost v1.85.0

* Update CHANGELOG.md

* Fix typo

* Fix issues found by newer clang-tidy version

* Add include to boost filesystem to satisfy Windows compiler
2024-05-06 18:52:40 +02:00
Dennis Luxen
99809e105c
Upgrade clang compiler in CI builds (#6861) 2024-05-06 18:12:17 +02:00
Dennis Luxen
7f9d591ab7
Upgrade clang-format to version 15 (#6859) 2024-05-06 09:14:46 +02:00
Michael Bell
b503e96a98
Remove force-loop checks for routes with u-turns (#6858)
Each leg of a via-route supporting u-turns does not need to consider
force-loops. Negative weight checks are sufficient to prevent
incorrect results when waypoints are on the same edge.
2024-05-05 21:56:01 +01:00
Matthew Wigginton Bhagat-Conway
7ebd21f39e
pass flags into process_segment (#6658)
* pass flags into process_segment

---------

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-04-06 09:27:42 +01:00
Michael Bell
8ef366e061
Add support for opposite approach request parameter (#6842)
* Added approach on the opposite side of the road.

* Additional test and docs coverage for opposite approach

---------

Co-authored-by: Aleksandrs Saveljevs <Aleksandrs.Saveljevs@gmail.com>
2024-04-03 19:59:15 +01:00
Michael Bell
d0e3e2af23
Extract prerelease/build information from package semver (#6839)
* Extract prerelease/build information from package semver

Currently we only extract the major.minor.patch identifiers from
the semver label stored in package.json.

This leads to version information in executables incorrectly
reporting a release version is running on prereleases and special builds.

This commit is a quickfix to extract this information and report it
in version strings.

CMake regex parsing is not sophisticated enough to handle the full semver
regex, so we might need to explore other CMake modules if we want to
strictly parse the label.
2024-03-24 18:33:07 +00:00
martin
8526cc7d45
Replace deprecated std::is_pod (#6717)
* Replace deprecated std::is_pod
2024-03-17 11:49:55 +00:00
Monday
6e77d53946
Correctly handle compressed traffic signals (#6724)
Unidirectional traffic signal segments are currently not compressed.
This means traffic signals which are not on turns can be missed and
not applied the correct penalty.

This commit changes this behaviour to correctly handle the graph
compression. Additional tests are added to ensure there is no
regression for other cases (turns, restrictions).

Co-authored-by: Michael Bell <michael@mjjbell.com>
2024-03-17 11:32:10 +00:00
Daniel Patterson
31e31a63d0
Fix some compilation issues on modern macOS systems (#6709)
* Fix various compiler warnings generated by Apple clang 15, and workaround some boost 1.8 bugs

* Fix formatting.
2023-10-12 23:04:39 +02:00
fenwuyaoji
14dcf91812
add keepalive_timeout flag (#6674)
* add keepalive_timeout flag
2023-08-30 19:06:39 +01:00
Whytro
3f9347cfb2
Fix operator overload on RouteParameters (#6646)
* Fix operator overload on RouteParameters
2023-08-19 21:48:15 +01:00
Michael Bell
db7946d762
Add support for disabling feature datasets (#6666)
This change adds support for disabling datasets, such that specific
files are not loaded into memory when running OSRM. This enables users
to not pay the memory cost for features they do not intend to use.

Initially, there are two options:
- ROUTE_GEOMETRY, for disabling overview, steps, annotations and waypoints.
- ROUTE_STEPS, for disabling steps only.

Attempts to query features for which the datasets are disabled will
lead to a DisabledDatasetException being returned.
2023-08-04 18:43:37 +01:00
Michael Bell
3bb82ce1e2
Minor fixes (#6655)
* Ensure required file check in osrm-routed is correctly enforced.

The storage module had a stricter check. This keeps the IOConfig
check in sync.

* Correct HTTP docs to reflect summary output dependency on steps parameter.

There is no summary parameter.

* npm audit fix
2023-07-18 20:23:23 +01:00
Lasse Liehu
af59a9cfae
Fix build with GCC 13 (#6632)
Building with GCC 13 failed because for example std::int32_t
was not found. Porting guide [1] suggested to add explicit includes
for <cstdint> if necessary, so did just that.

[1]: https://gcc.gnu.org/gcc-13/porting_to.html
2023-05-31 07:53:04 +02:00
Whytro
72da455185
Allow -1.0 as unlimited for default_radius value (#6599) 2023-05-31 07:52:35 +02:00
Al
0ca913132a
Added block_counter variable to a preprocessor check, minor bug. (#6596) 2023-04-16 23:22:30 +02:00
Whytro
d51631401e
Add support for a default_bearing_radius flag (#6575) 2023-03-24 16:49:33 +01:00
Matthew Wigginton Bhagat-Conway
d6afe91d8f
print tracebacks and line numbers for Lua runtime errors (#6564)
* print tracebacks and line numbers for Lua runtime errors

* revert format changes

* update changelog with lua traceback, #6564

* revert using protected_function for old GetStringListFromFunction and source_function #6564

* add unit test for line numbers in tracebacks, #6564

* apply clang-format (#6564)

* remove unused test helper function, #6564

* suppress leaksanitizer warnings in extract-tests, #6564

When the extractor encounters a lua runtime error, some osmium objects are not freed. In production this doesn't matter because these errors bring down OSRM. In the tests we catch them to ensure they occur, and the leaksanitizer flags them.
2023-03-23 19:18:58 +01:00
Jingchen Ye
0e7c3d8ad4
Move TarjanSCC from extractor to util (#6562) 2023-03-09 17:47:28 +01:00
zephyr
ebd9ab4548
fix(json_render): json_render is not accurate enough for extremely sm… (#6531) 2023-02-02 18:58:25 +01:00
Jeremiah
e590dae5f6
Fix boost header deprecation warning (#6515) 2023-01-21 08:47:05 +01:00
Dennis Luxen
7c06726a35 Fix formatting 2022-12-20 18:00:11 +01:00
Dennis Luxen
d7c44f0bc0 Merge remote-tracking branch 'origin/master' into nested_namespace 2022-12-11 10:25:13 +01:00
Dennis Luxen
a4aa153ba4 Use nested namespace
It's a mechanical change to modernize the code base
2022-12-11 10:17:17 +01:00
Dennis Luxen
612ca82a06 Fix formatting 2022-12-10 20:01:16 +01:00