Skip to content

Fix clang-tidy-20 warnings#7381

Merged
DennisOSRM merged 2 commits intoProject-OSRM:masterfrom
MarcelloPerathoner:fix-tidy-20-warnings
Feb 27, 2026
Merged

Fix clang-tidy-20 warnings#7381
DennisOSRM merged 2 commits intoProject-OSRM:masterfrom
MarcelloPerathoner:fix-tidy-20-warnings

Conversation

@MarcelloPerathoner
Copy link
Copy Markdown
Contributor

@MarcelloPerathoner MarcelloPerathoner commented Feb 25, 2026

This PR fixes warnings (errors) by clang-tidy 20 and 21. Some code has been refactored from hpp into cpp.

One use of std::forward in a loop has been fixed:

/home/runner/work/osrm-backend/osrm-backend/include/engine/routing_algorithms/routing_base_ch.hpp:257:36: error: 'callback' used after it was forwarded [bugprone-use-after-move,-warnings-as-errors]
  257 |             std::forward<Callback>(callback)(edge, smaller_edge_id);
      |                                    ^
/home/runner/work/osrm-backend/osrm-backend/include/engine/routing_algorithms/routing_base_ch.hpp:257:13: note: forward occurred here
  257 |             std::forward<Callback>(callback)(edge, smaller_edge_id);
      |             ^
/home/runner/work/osrm-backend/osrm-backend/include/engine/routing_algorithms/routing_base_ch.hpp:257:36: note: the use happens in a later loop iteration than the forward
  257 |             std::forward<Callback>(callback)(edge, smaller_edge_id);
      |                                    ^

Copy link
Copy Markdown
Collaborator

@DennisOSRM DennisOSRM left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change is looking good. Can't wait for newer toolsets to arrive for the CI jobs.

@DennisOSRM DennisOSRM merged commit ba2f4ec into Project-OSRM:master Feb 27, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants