From 911d1e81b60e7648b74390e6ee296371169ac9ef Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Sat, 4 Jun 2016 08:31:18 +0200 Subject: [PATCH] Make explicit promotion to int64_t to avoid incorrect promotions for 32 bit size_t --- include/engine/routing_algorithms/alternative_path.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/engine/routing_algorithms/alternative_path.hpp b/include/engine/routing_algorithms/alternative_path.hpp index df5cfd89f..8bffd260e 100644 --- a/include/engine/routing_algorithms/alternative_path.hpp +++ b/include/engine/routing_algorithms/alternative_path.hpp @@ -546,8 +546,8 @@ class AlternativeRouting final } } - via_path_index = partially_unpacked_via_path.size() - 1; - shortest_path_index = partially_unpacked_shortest_path.size() - 1; + via_path_index = static_cast(partially_unpacked_via_path.size()) - 1; + shortest_path_index = static_cast(partially_unpacked_shortest_path.size()) - 1; for (; via_path_index > 0 && shortest_path_index > 0; --via_path_index, --shortest_path_index) {