diff --git a/include/engine/routing_algorithms/routing_base_mld.hpp b/include/engine/routing_algorithms/routing_base_mld.hpp index 6bff49564..96351c092 100644 --- a/include/engine/routing_algorithms/routing_base_mld.hpp +++ b/include/engine/routing_algorithms/routing_base_mld.hpp @@ -290,16 +290,18 @@ void relaxOutgoingEdges(const DataFacade &facade, const auto &cell = cells.GetCell(metric, level, partition.GetCell(level, heapNode.node)); auto destination = cell.GetDestinationNodes().begin(); - auto distance = [&heapNode]() -> auto { + auto distance = [&heapNode, &cell]() -> auto { if constexpr (std::is_same_v::MapMatchingQueryHeap, Heap>) { return cell.GetOutDistance(heapNode.node).begin(); } else { + (void)cell; + (void)heapNode; return 0; } - } ; + }(); for (auto shortcut_weight : cell.GetOutWeight(heapNode.node)) { BOOST_ASSERT(destination != cell.GetDestinationNodes().end()); @@ -313,7 +315,7 @@ void relaxOutgoingEdges(const DataFacade &facade, if (!toHeapNode) { if constexpr (std::is_same_v::MapMatchingQueryHeap, + mld::Algorithm>::MapMatchingQueryHeap, Heap>) { const EdgeDistance to_distance = heapNode.data.distance + *distance; @@ -327,7 +329,7 @@ void relaxOutgoingEdges(const DataFacade &facade, else if (to_weight < toHeapNode->weight) { if constexpr (std::is_same_v::MapMatchingQueryHeap, + mld::Algorithm>::MapMatchingQueryHeap, Heap>) { const EdgeDistance to_distance = heapNode.data.distance + *distance; @@ -351,16 +353,18 @@ void relaxOutgoingEdges(const DataFacade &facade, const auto &cell = cells.GetCell(metric, level, partition.GetCell(level, heapNode.node)); auto source = cell.GetSourceNodes().begin(); - auto distance = [&heapNode]() -> auto { + auto distance = [&heapNode, &cell]() -> auto { if constexpr (std::is_same_v::MapMatchingQueryHeap, Heap>) { return cell.GetOutDistance(heapNode.node).begin(); } else { + (void)cell; + (void)heapNode; return 0; } - } ; + }(); for (auto shortcut_weight : cell.GetInWeight(heapNode.node)) { BOOST_ASSERT(source != cell.GetSourceNodes().end()); @@ -374,7 +378,7 @@ void relaxOutgoingEdges(const DataFacade &facade, if (!toHeapNode) { if constexpr (std::is_same_v::MapMatchingQueryHeap, + mld::Algorithm>::MapMatchingQueryHeap, Heap>) { const EdgeDistance to_distance = heapNode.data.distance + *distance; @@ -388,7 +392,7 @@ void relaxOutgoingEdges(const DataFacade &facade, else if (to_weight < toHeapNode->weight) { if constexpr (std::is_same_v::MapMatchingQueryHeap, + mld::Algorithm>::MapMatchingQueryHeap, Heap>) { const EdgeDistance to_distance = heapNode.data.distance + *distance; @@ -434,7 +438,7 @@ void relaxOutgoingEdges(const DataFacade &facade, if (!toHeapNode) { if constexpr (std::is_same_v< - typename SearchEngineData::MapMatchingQueryHeap, + typename SearchEngineData::MapMatchingQueryHeap, Heap>) { const auto node_distance = @@ -452,7 +456,7 @@ void relaxOutgoingEdges(const DataFacade &facade, else if (to_weight < toHeapNode->weight) { if constexpr (std::is_same_v< - typename SearchEngineData::MapMatchingQueryHeap, + typename SearchEngineData::MapMatchingQueryHeap, Heap>) { const auto node_distance =