From a37f43bf3f917f6a9a52f1046b704024d4f3e467 Mon Sep 17 00:00:00 2001 From: Siarhei Fedartsou Date: Tue, 21 May 2024 20:36:16 +0200 Subject: [PATCH] use constexpr if --- .github/workflows/osrm-backend.yml | 60 +++++++++---------- .../routing_algorithms/routing_base_mld.hpp | 1 - include/engine/search_engine_data.hpp | 7 +-- 3 files changed, 32 insertions(+), 36 deletions(-) diff --git a/.github/workflows/osrm-backend.yml b/.github/workflows/osrm-backend.yml index 3175dd6d4..3b8242153 100644 --- a/.github/workflows/osrm-backend.yml +++ b/.github/workflows/osrm-backend.yml @@ -25,7 +25,7 @@ concurrency: jobs: windows-release-node: - # needs: format-taginfo-docs + needs: format-taginfo-docs runs-on: windows-2022 continue-on-error: false env: @@ -73,35 +73,35 @@ jobs: replacesArtifacts: true token: ${{ secrets.GITHUB_TOKEN }} - # format-taginfo-docs: - # runs-on: ubuntu-22.04 - # steps: - # - uses: actions/checkout@v3 - # - name: Use Node.js - # uses: actions/setup-node@v3 - # with: - # node-version: 18 - # - name: Enable Node.js cache - # uses: actions/cache@v3 - # with: - # path: ~/.npm - # key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} - # restore-keys: | - # ${{ runner.os }}-node- - # - name: Prepare environment - # run: | - # npm ci --ignore-scripts - # clang-format-15 --version - # - name: Run checks - # run: | - # ./scripts/check_taginfo.py taginfo.json profiles/car.lua - # ./scripts/format.sh && ./scripts/error_on_dirty.sh - # node ./scripts/validate_changelog.js - # npm run docs && ./scripts/error_on_dirty.sh - # npm audit --production + format-taginfo-docs: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - name: Use Node.js + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Enable Node.js cache + uses: actions/cache@v3 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- + - name: Prepare environment + run: | + npm ci --ignore-scripts + clang-format-15 --version + - name: Run checks + run: | + ./scripts/check_taginfo.py taginfo.json profiles/car.lua + ./scripts/format.sh && ./scripts/error_on_dirty.sh + node ./scripts/validate_changelog.js + npm run docs && ./scripts/error_on_dirty.sh + npm audit --production docker-image: - #needs: format-taginfo-docs + needs: format-taginfo-docs runs-on: ubuntu-22.04 continue-on-error: false steps: @@ -144,7 +144,7 @@ jobs: docker stop osrm-container build-test-publish: - #needs: format-taginfo-docs + needs: format-taginfo-docs strategy: matrix: include: @@ -583,7 +583,7 @@ jobs: benchmarks: if: github.event_name == 'pull_request' - # needs: [format-taginfo-docs] + needs: [format-taginfo-docs] runs-on: ubuntu-22.04 env: CCOMPILER: clang-13 diff --git a/include/engine/routing_algorithms/routing_base_mld.hpp b/include/engine/routing_algorithms/routing_base_mld.hpp index a8cbc712a..d4e3e9f21 100644 --- a/include/engine/routing_algorithms/routing_base_mld.hpp +++ b/include/engine/routing_algorithms/routing_base_mld.hpp @@ -303,7 +303,6 @@ void relaxOutgoingEdges(const DataFacade &facade, static constexpr auto IS_MAP_MATCHING = std::is_same_v::MapMatchingQueryHeap, Heap>; - // SearchEngineData::MapMatchingQueryHeap if (level >= 1 && !heapNode.data.from_clique_arc) { if constexpr (DIRECTION == FORWARD_DIRECTION) diff --git a/include/engine/search_engine_data.hpp b/include/engine/search_engine_data.hpp index 420c39942..4060ab6b2 100644 --- a/include/engine/search_engine_data.hpp +++ b/include/engine/search_engine_data.hpp @@ -50,9 +50,6 @@ template <> struct SearchEngineData using ManyToManyHeapPtr = boost::thread_specific_ptr; - using MapMatchingQueryHeap = QueryHeap; - using MapMatchingQueryHeapPtr = boost::thread_specific_ptr; - static SearchEngineHeapPtr forward_heap_1; static SearchEngineHeapPtr reverse_heap_1; static SearchEngineHeapPtr forward_heap_2; @@ -60,8 +57,8 @@ template <> struct SearchEngineData static SearchEngineHeapPtr forward_heap_3; static SearchEngineHeapPtr reverse_heap_3; static ManyToManyHeapPtr many_to_many_heap; - static MapMatchingQueryHeapPtr map_matching_forward_heap_1; - static MapMatchingQueryHeapPtr map_matching_reverse_heap_1; + static SearchEngineHeapPtr map_matching_forward_heap_1; + static SearchEngineHeapPtr map_matching_reverse_heap_1; void InitializeOrClearMapMatchingThreadLocalStorage(unsigned number_of_nodes);