use constexpr if

This commit is contained in:
Siarhei Fedartsou 2024-05-21 20:36:16 +02:00
parent e562d34639
commit a37f43bf3f
3 changed files with 32 additions and 36 deletions

View File

@ -25,7 +25,7 @@ concurrency:
jobs: jobs:
windows-release-node: windows-release-node:
# needs: format-taginfo-docs needs: format-taginfo-docs
runs-on: windows-2022 runs-on: windows-2022
continue-on-error: false continue-on-error: false
env: env:
@ -73,35 +73,35 @@ jobs:
replacesArtifacts: true replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
# format-taginfo-docs: format-taginfo-docs:
# runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
# steps: steps:
# - uses: actions/checkout@v3 - uses: actions/checkout@v3
# - name: Use Node.js - name: Use Node.js
# uses: actions/setup-node@v3 uses: actions/setup-node@v3
# with: with:
# node-version: 18 node-version: 18
# - name: Enable Node.js cache - name: Enable Node.js cache
# uses: actions/cache@v3 uses: actions/cache@v3
# with: with:
# path: ~/.npm path: ~/.npm
# key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
# restore-keys: | restore-keys: |
# ${{ runner.os }}-node- ${{ runner.os }}-node-
# - name: Prepare environment - name: Prepare environment
# run: | run: |
# npm ci --ignore-scripts npm ci --ignore-scripts
# clang-format-15 --version clang-format-15 --version
# - name: Run checks - name: Run checks
# run: | run: |
# ./scripts/check_taginfo.py taginfo.json profiles/car.lua ./scripts/check_taginfo.py taginfo.json profiles/car.lua
# ./scripts/format.sh && ./scripts/error_on_dirty.sh ./scripts/format.sh && ./scripts/error_on_dirty.sh
# node ./scripts/validate_changelog.js node ./scripts/validate_changelog.js
# npm run docs && ./scripts/error_on_dirty.sh npm run docs && ./scripts/error_on_dirty.sh
# npm audit --production npm audit --production
docker-image: docker-image:
#needs: format-taginfo-docs needs: format-taginfo-docs
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
continue-on-error: false continue-on-error: false
steps: steps:
@ -144,7 +144,7 @@ jobs:
docker stop osrm-container docker stop osrm-container
build-test-publish: build-test-publish:
#needs: format-taginfo-docs needs: format-taginfo-docs
strategy: strategy:
matrix: matrix:
include: include:
@ -583,7 +583,7 @@ jobs:
benchmarks: benchmarks:
if: github.event_name == 'pull_request' if: github.event_name == 'pull_request'
# needs: [format-taginfo-docs] needs: [format-taginfo-docs]
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
env: env:
CCOMPILER: clang-13 CCOMPILER: clang-13

View File

@ -303,7 +303,6 @@ void relaxOutgoingEdges(const DataFacade<Algorithm> &facade,
static constexpr auto IS_MAP_MATCHING = static constexpr auto IS_MAP_MATCHING =
std::is_same_v<typename SearchEngineData<mld::Algorithm>::MapMatchingQueryHeap, Heap>; std::is_same_v<typename SearchEngineData<mld::Algorithm>::MapMatchingQueryHeap, Heap>;
// SearchEngineData<Algorithm>::MapMatchingQueryHeap
if (level >= 1 && !heapNode.data.from_clique_arc) if (level >= 1 && !heapNode.data.from_clique_arc)
{ {
if constexpr (DIRECTION == FORWARD_DIRECTION) if constexpr (DIRECTION == FORWARD_DIRECTION)

View File

@ -50,9 +50,6 @@ template <> struct SearchEngineData<routing_algorithms::ch::Algorithm>
using ManyToManyHeapPtr = boost::thread_specific_ptr<ManyToManyQueryHeap>; using ManyToManyHeapPtr = boost::thread_specific_ptr<ManyToManyQueryHeap>;
using MapMatchingQueryHeap = QueryHeap;
using MapMatchingQueryHeapPtr = boost::thread_specific_ptr<QueryHeap>;
static SearchEngineHeapPtr forward_heap_1; static SearchEngineHeapPtr forward_heap_1;
static SearchEngineHeapPtr reverse_heap_1; static SearchEngineHeapPtr reverse_heap_1;
static SearchEngineHeapPtr forward_heap_2; static SearchEngineHeapPtr forward_heap_2;
@ -60,8 +57,8 @@ template <> struct SearchEngineData<routing_algorithms::ch::Algorithm>
static SearchEngineHeapPtr forward_heap_3; static SearchEngineHeapPtr forward_heap_3;
static SearchEngineHeapPtr reverse_heap_3; static SearchEngineHeapPtr reverse_heap_3;
static ManyToManyHeapPtr many_to_many_heap; static ManyToManyHeapPtr many_to_many_heap;
static MapMatchingQueryHeapPtr map_matching_forward_heap_1; static SearchEngineHeapPtr map_matching_forward_heap_1;
static MapMatchingQueryHeapPtr map_matching_reverse_heap_1; static SearchEngineHeapPtr map_matching_reverse_heap_1;
void InitializeOrClearMapMatchingThreadLocalStorage(unsigned number_of_nodes); void InitializeOrClearMapMatchingThreadLocalStorage(unsigned number_of_nodes);