Make explicit promotion to int64_t

to avoid incorrect promotions for 32 bit size_t
This commit is contained in:
Michael Krasnyk 2016-06-04 08:31:18 +02:00
parent ae06300c17
commit 911d1e81b6
No known key found for this signature in database
GPG Key ID: 3854C9454FE00649

View File

@ -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<int64_t>(partially_unpacked_via_path.size()) - 1;
shortest_path_index = static_cast<int64_t>(partially_unpacked_shortest_path.size()) - 1;
for (; via_path_index > 0 && shortest_path_index > 0;
--via_path_index, --shortest_path_index)
{